Documentation ¶
Index ¶
- type LoanOrder
- type LoanOrders
- type OrderBook
- type OrderBookEntry
- type PoloniexClient
- func (poloniexClient *PoloniexClient) ReturnBalances() (balances *map[string]float64, err error)
- func (poloniexClient *PoloniexClient) ReturnLoanOrders(currency string) (loanorders *LoanOrders, err error)
- func (poloniexClient *PoloniexClient) ReturnOrderBook(currencypair string, depth int) (orderbook *OrderBook, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoanOrder ¶
LoanOrder is a single an order (offer or demand) for a specific rate
func (*LoanOrder) UnmarshalJSON ¶
UnmarshalJSON is a custom unmarshaller to convert the strings poloniex returns as Rate and Amount to floats
type LoanOrders ¶
LoanOrders are the loan offers and demands for a specific currency
type OrderBook ¶
type OrderBook struct { CurrencyPair string Asks []OrderBookEntry Bids []OrderBookEntry }
OrderBook is the asks and bids for a currency pair
type OrderBookEntry ¶
OrderBookEntry is a value/amount combination representing an entry in an OrderBook
func (*OrderBookEntry) UnmarshalJSON ¶
func (entry *OrderBookEntry) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON is a custom unmarshaller to handle poloniex special json format
type PoloniexClient ¶
PoloniexClient is a client to the poloniex (https://www.poloniex.com) api
func NewClient ¶
func NewClient(key, secret string) (client *PoloniexClient, err error)
NewClient creates a new poloniex client given the api key and secret
func (*PoloniexClient) ReturnBalances ¶
func (poloniexClient *PoloniexClient) ReturnBalances() (balances *map[string]float64, err error)
ReturnBalances returns the available balances
func (*PoloniexClient) ReturnLoanOrders ¶
func (poloniexClient *PoloniexClient) ReturnLoanOrders(currency string) (loanorders *LoanOrders, err error)
ReturnLoanOrders returns the loan offers and demands for a specific currency
func (*PoloniexClient) ReturnOrderBook ¶
func (poloniexClient *PoloniexClient) ReturnOrderBook(currencypair string, depth int) (orderbook *OrderBook, err error)
ReturnOrderBook returns the orderbook for a specific currencypair up to a certain depth