Documentation
¶
Index ¶
- type AccountInfo
- type AuthenticatedTradeHistory
- type ExternalAccounts
- type LakeBTC
- func (l *LakeBTC) CancelOrder(orderID int64) error
- func (l *LakeBTC) CreateWithdraw(amount float64, accountID int64) (Withdraw, error)
- func (l *LakeBTC) GetAccountInfo() (AccountInfo, error)
- func (l *LakeBTC) GetExchangeAccountInfo() (exchange.AccountInfo, error)
- func (l *LakeBTC) GetExternalAccounts() ([]ExternalAccounts, error)
- func (l *LakeBTC) GetFee(maker bool) float64
- func (l *LakeBTC) GetOpenOrders() ([]OpenOrders, error)
- func (l *LakeBTC) GetOrderBook(currency string) (Orderbook, error)
- func (l *LakeBTC) GetOrderbookEx(p pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (l *LakeBTC) GetOrders(orders []int64) ([]Orders, error)
- func (l *LakeBTC) GetTicker() (map[string]Ticker, error)
- func (l *LakeBTC) GetTickerPrice(p pair.CurrencyPair, assetType string) (ticker.Price, error)
- func (l *LakeBTC) GetTradeHistory(currency string) ([]TradeHistory, error)
- func (l *LakeBTC) GetTrades(timestamp int64) ([]AuthenticatedTradeHistory, error)
- func (l *LakeBTC) Run()
- func (l *LakeBTC) SendAuthenticatedHTTPRequest(method, params string, result interface{}) (err error)
- func (l *LakeBTC) SetDefaults()
- func (l *LakeBTC) Setup(exch config.ExchangeConfig)
- func (l *LakeBTC) Start()
- func (l *LakeBTC) Trade(orderType int, amount, price float64, currency string) (Trade, error)
- func (l *LakeBTC) UpdateOrderbook(p pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (l *LakeBTC) UpdateTicker(p pair.CurrencyPair, assetType string) (ticker.Price, error)
- type OpenOrders
- type Orderbook
- type OrderbookStructure
- type Orders
- type Ticker
- type TickerResponse
- type Trade
- type TradeHistory
- type Withdraw
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInfo ¶
type AccountInfo struct { Balance map[string]string `json:"balance"` Locked map[string]string `json:"locked"` Profile struct { Email string `json:"email"` UID string `json:"uid"` BTCDepositAddress string `json:"btc_deposit_addres"` } `json:"profile"` }
AccountInfo contains account information
type AuthenticatedTradeHistory ¶
type AuthenticatedTradeHistory struct { Type string `json:"type"` Symbol string `json:"symbol"` Amount float64 `json:"amount,string"` Total float64 `json:"total,string"` At int64 `json:"at"` }
AuthenticatedTradeHistory is a store of personalised auth trade history
type ExternalAccounts ¶
type ExternalAccounts struct { ID int64 `json:"id,string"` Type string `json:"type"` Address string `json:"address"` Alias interface{} `json:"alias"` Currencies string `json:"currencies"` State string `json:"state"` UpdatedAt int64 `json:"updated_at,string"` }
ExternalAccounts holds external account information
type LakeBTC ¶
type LakeBTC struct {
exchange.Base
}
LakeBTC is the overarching type across the LakeBTC package
func (*LakeBTC) CancelOrder ¶
CancelOrder cancels an order by ID number and returns an error
func (*LakeBTC) CreateWithdraw ¶
CreateWithdraw allows your to withdraw to external account WARNING: Only for BTC!
func (*LakeBTC) GetAccountInfo ¶
func (l *LakeBTC) GetAccountInfo() (AccountInfo, error)
GetAccountInfo returns your current account information
func (*LakeBTC) GetExchangeAccountInfo ¶
GetExchangeAccountInfo retrieves balances for all enabled currencies for the LakeBTC exchange
func (*LakeBTC) GetExternalAccounts ¶
func (l *LakeBTC) GetExternalAccounts() ([]ExternalAccounts, error)
GetExternalAccounts returns your external accounts WARNING: Only for BTC!
func (*LakeBTC) GetOpenOrders ¶
func (l *LakeBTC) GetOpenOrders() ([]OpenOrders, error)
GetOpenOrders returns all open orders associated with your account
func (*LakeBTC) GetOrderBook ¶
GetOrderBook returns the order book from LakeBTC
func (*LakeBTC) GetOrderbookEx ¶
GetOrderbookEx returns orderbook base on the currency pair
func (*LakeBTC) GetTickerPrice ¶
GetTickerPrice returns the ticker for a currency pair
func (*LakeBTC) GetTradeHistory ¶
func (l *LakeBTC) GetTradeHistory(currency string) ([]TradeHistory, error)
GetTradeHistory returns the trade history for a given currency pair
func (*LakeBTC) GetTrades ¶
func (l *LakeBTC) GetTrades(timestamp int64) ([]AuthenticatedTradeHistory, error)
GetTrades returns trades associated with your account by timestamp
func (*LakeBTC) SendAuthenticatedHTTPRequest ¶
func (l *LakeBTC) SendAuthenticatedHTTPRequest(method, params string, result interface{}) (err error)
SendAuthenticatedHTTPRequest sends an autheticated HTTP request to a LakeBTC
func (*LakeBTC) Setup ¶
func (l *LakeBTC) Setup(exch config.ExchangeConfig)
Setup sets exchange configuration profile
func (*LakeBTC) Trade ¶
Trade executes an order on the exchange and returns trade inforamtion or an error
func (*LakeBTC) UpdateOrderbook ¶
UpdateOrderbook updates and returns the orderbook for a currency pair
func (*LakeBTC) UpdateTicker ¶
UpdateTicker updates and returns the ticker for a currency pair
type OpenOrders ¶
type OpenOrders struct { ID int64 `json:"id"` Amount float64 `json:"amount,string"` Price float64 `json:"price,string"` Symbol string `json:"symbol"` Type string `json:"type"` At int64 `json:"at"` }
OpenOrders stores full information on your open orders
type Orderbook ¶
type Orderbook struct { Bids []OrderbookStructure `json:"bids"` Asks []OrderbookStructure `json:"asks"` }
Orderbook contains arrays of orderbook information
type OrderbookStructure ¶
OrderbookStructure stores price and amount for order books
type Orders ¶
type Orders struct { ID int64 `json:"id"` OriginalAmount float64 `json:"original_amount,string"` Amount float64 `json:"amount,string"` Price float64 `json:"price,string"` Symbol string `json:"symbol"` Type string `json:"type"` State string `json:"state"` At int64 `json:"at"` }
Orders holds current order information
type TickerResponse ¶
type TickerResponse struct { Last interface{} Bid interface{} Ask interface{} High interface{} Low interface{} Volume interface{} }
TickerResponse stores temp response Silly hack due to API returning null instead of strings
type TradeHistory ¶
type TradeHistory struct { Date int64 `json:"data"` Price float64 `json:"price,string"` Amount float64 `json:"amount,string"` TID int64 `json:"tid"` }
TradeHistory holds trade history data
type Withdraw ¶
type Withdraw struct { ID int64 `json:"id,string"` Amount float64 `json:"amount,string"` Currency string `json:"currency"` Fee float64 `json:"fee,string"` State string `json:"state"` Source string `json:"source"` ExternalAccountID int64 `json:"external_account_id,string"` At int64 `json:"at"` }
Withdraw holds withdrawal information