Documentation ¶
Index ¶
- type AccountInfo
- type ActiveOrders
- type CancelOrder
- type Info
- type Liqui
- func (l *Liqui) CancelOrder(OrderID int64) (bool, error)
- func (l *Liqui) GetAccountInfo() (AccountInfo, error)
- func (l *Liqui) GetActiveOrders(pair string) (map[string]ActiveOrders, error)
- func (l *Liqui) GetAvailablePairs(nonHidden bool) []string
- func (l *Liqui) GetDepth(currencyPair string) (Orderbook, error)
- func (l *Liqui) GetExchangeAccountInfo() (exchange.AccountInfo, error)
- func (l *Liqui) GetExchangeHistory(p pair.CurrencyPair, assetType string) ([]exchange.TradeHistory, error)
- func (l *Liqui) GetFee(currency string) (float64, error)
- func (l *Liqui) GetInfo() (Info, error)
- func (l *Liqui) GetOrderInfo(OrderID int64) (map[string]OrderInfo, error)
- func (l *Liqui) GetOrderbookEx(p pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (l *Liqui) GetTicker(currencyPair string) (map[string]Ticker, error)
- func (l *Liqui) GetTickerPrice(p pair.CurrencyPair, assetType string) (ticker.Price, error)
- func (l *Liqui) GetTradeHistory(vals url.Values, pair string) (map[string]TradeHistory, error)
- func (l *Liqui) GetTrades(currencyPair string) ([]Trades, error)
- func (l *Liqui) Run()
- func (l *Liqui) SendAuthenticatedHTTPRequest(method string, values url.Values, result interface{}) (err error)
- func (l *Liqui) SendHTTPRequest(path string, result interface{}) error
- func (l *Liqui) SetDefaults()
- func (l *Liqui) Setup(exch config.ExchangeConfig)
- func (l *Liqui) Start()
- func (l *Liqui) Trade(pair, orderType string, amount, price float64) (float64, error)
- func (l *Liqui) UpdateOrderbook(p pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (l *Liqui) UpdateTicker(p pair.CurrencyPair, assetType string) (ticker.Price, error)
- func (l *Liqui) WithdrawCoins(coin string, amount float64, address string) (WithdrawCoins, error)
- type OrderInfo
- type Orderbook
- type PairData
- type Response
- type Ticker
- type Trade
- type TradeHistory
- type Trades
- type WithdrawCoins
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInfo ¶
type AccountInfo struct { Funds map[string]float64 `json:"funds"` Rights struct { Info bool `json:"info"` Trade bool `json:"trade"` Withdraw bool `json:"withdraw"` } `json:"rights"` ServerTime float64 `json:"server_time"` TransactionCount int `json:"transaction_count"` OpenOrders int `json:"open_orders"` Success int `json:"success"` Error string `json:"error"` }
AccountInfo contains full account details information
type ActiveOrders ¶
type ActiveOrders struct { Pair string `json:"pair"` Type string `json:"sell"` Amount float64 `json:"amount"` Rate float64 `json:"rate"` TimestampCreated float64 `json:"time_created"` Status int `json:"status"` Success int `json:"success"` Error string `json:"error"` }
ActiveOrders holds active order information
type CancelOrder ¶
type CancelOrder struct { OrderID float64 `json:"order_id"` Funds map[string]float64 `json:"funds"` Success int `json:"success"` Error string `json:"error"` }
CancelOrder holds cancelled order information
type Info ¶
type Info struct { ServerTime int64 `json:"server_time"` Pairs map[string]PairData `json:"pairs"` Success int `json:"success"` Error string `json:"error"` }
Info holds the current pair information as well as server time
type Liqui ¶
Liqui is the overarching type across the liqui package
func (*Liqui) CancelOrder ¶
CancelOrder method is used for order cancelation.
func (*Liqui) GetAccountInfo ¶
func (l *Liqui) GetAccountInfo() (AccountInfo, error)
GetAccountInfo returns information about the user’s current balance, API-key privileges, the number of open orders and Server Time. To use this method you need a privilege of the key info.
func (*Liqui) GetActiveOrders ¶
func (l *Liqui) GetActiveOrders(pair string) (map[string]ActiveOrders, error)
GetActiveOrders returns the list of your active orders.
func (*Liqui) GetAvailablePairs ¶
GetAvailablePairs returns all available pairs
func (*Liqui) GetDepth ¶
GetDepth information about active orders on the pair. Additionally it accepts an optional GET-parameter limit, which indicates how many orders should be displayed (150 by default). Is set to less than 2000.
func (*Liqui) GetExchangeAccountInfo ¶
GetExchangeAccountInfo retrieves balances for all enabled currencies for the Liqui exchange
func (*Liqui) GetExchangeHistory ¶
func (l *Liqui) GetExchangeHistory(p pair.CurrencyPair, assetType string) ([]exchange.TradeHistory, error)
GetExchangeHistory returns historic trade data since exchange opening.
func (*Liqui) GetInfo ¶
GetInfo provides all the information about currently active pairs, such as the maximum number of digits after the decimal point, the minimum price, the maximum price, the minimum transaction size, whether the pair is hidden, the commission for each pair.
func (*Liqui) GetOrderInfo ¶
GetOrderInfo returns the information on particular order.
func (*Liqui) GetOrderbookEx ¶
GetOrderbookEx returns orderbook base on the currency pair
func (*Liqui) GetTicker ¶
GetTicker returns information about currently active pairs, such as: the maximum price, the minimum price, average price, trade volume, trade volume in currency, the last trade, Buy and Sell price. All information is provided over the past 24 hours.
currencyPair - example "eth_btc"
func (*Liqui) GetTickerPrice ¶
GetTickerPrice returns the ticker for a currency pair
func (*Liqui) GetTradeHistory ¶
GetTradeHistory returns trade history
func (*Liqui) GetTrades ¶
GetTrades returns information about the last trades. Additionally it accepts an optional GET-parameter limit, which indicates how many orders should be displayed (150 by default). The maximum allowable value is 2000.
func (*Liqui) SendAuthenticatedHTTPRequest ¶
func (l *Liqui) SendAuthenticatedHTTPRequest(method string, values url.Values, result interface{}) (err error)
SendAuthenticatedHTTPRequest sends an authenticated http request to liqui
func (*Liqui) SendHTTPRequest ¶
SendHTTPRequest sends an unauthenticated HTTP request
func (*Liqui) SetDefaults ¶
func (l *Liqui) SetDefaults()
SetDefaults sets current default values for liqui
func (*Liqui) Setup ¶
func (l *Liqui) Setup(exch config.ExchangeConfig)
Setup sets exchange configuration parameters for liqui
func (*Liqui) UpdateOrderbook ¶
UpdateOrderbook updates and returns the orderbook for a currency pair
func (*Liqui) UpdateTicker ¶
UpdateTicker updates and returns the ticker for a currency pair
func (*Liqui) WithdrawCoins ¶
WithdrawCoins is designed for cryptocurrency withdrawals. API mentions that this isn't active now, but will be soon - you must provide the first 8 characters of the key in your ticket to support.
type OrderInfo ¶
type OrderInfo struct { Pair string `json:"pair"` Type string `json:"sell"` StartAmount float64 `json:"start_amount"` Amount float64 `json:"amount"` Rate float64 `json:"rate"` TimestampCreated float64 `json:"time_created"` Status int `json:"status"` Success int `json:"success"` Error string `json:"error"` }
OrderInfo holds specific order information
type PairData ¶
type PairData struct { DecimalPlaces int `json:"decimal_places"` MinPrice float64 `json:"min_price"` MaxPrice float64 `json:"max_price"` MinAmount float64 `json:"min_amount"` Hidden int `json:"hidden"` Fee float64 `json:"fee"` }
PairData is a sub-type for Info
type Response ¶
type Response struct { Return interface{} `json:"return"` Success int `json:"success"` Error string `json:"error"` }
Response is a generalized return type
type Ticker ¶
type Ticker struct { High float64 Low float64 Avg float64 Vol float64 VolumeCurrency float64 Last float64 Buy float64 Sell float64 Updated int64 }
Ticker contains ticker information
type Trade ¶
type Trade struct { Received float64 `json:"received"` Remains float64 `json:"remains"` OrderID float64 `json:"order_id"` Funds map[string]float64 `json:"funds"` Success int `json:"success"` Error string `json:"error"` }
Trade holds trading information
type TradeHistory ¶
type TradeHistory struct { Pair string `json:"pair"` Type string `json:"type"` Amount float64 `json:"amount"` Rate float64 `json:"rate"` OrderID float64 `json:"order_id"` MyOrder int `json:"is_your_order"` Timestamp float64 `json:"timestamp"` Success int `json:"success"` Error string `json:"error"` }
TradeHistory contains trade history data