Versions in this module Expand all Collapse all v1 v1.0.0 Mar 20, 2019 Changes in this version + const SUBSBUFFER + const TICKER + var ChannelError = "[ERROR] Unknown Channel Name: %s" + var ConnectError = "[ERROR] Connection could not be established!" + var EndTimeError = "[ERROR] End Time Format Error!" + var LimitError = "[ERROR] Limit Format Error!" + var NewTradeError = "[ERROR] MarketUpdate NewTrade Parsing %s" + var PeriodError = "[ERROR] Invalid Period!" + var RequestError = "[ERROR] NewRequest Error!" + var ServerError = "[SERVER ERROR] Response: %s" + var SetApiError = "[ERROR] Set the API KEY and API SECRET!" + var StartTimeError = "[ERROR] Start Time Format Error!" + var SubscribeError = "[ERROR] Already Subscribed!" + var TimeError = "[ERROR] Invalid Time!" + var TimePeriodError = "[ERROR] Time Period incompatibility!" + var WSOrderBookError = "[ERROR] MarketUpdate OrderBook Parsing %s" + var WSTickerError = "[ERROR] WSTicker Parsing %s" + var ZeroTime = time.Time + func Error(msg string, args ...interface{}) error + type Accounts struct + Exchange map[string]decimal.Decimal + Lending map[string]decimal.Decimal + Margin map[string]decimal.Decimal + type Balance struct + Available decimal.Decimal + BtcValue decimal.Decimal + OnOrders decimal.Decimal + type Book struct + Price float64 + Quantity float64 + func (bk *Book) UnmarshalJSON(b []byte) error + type Buy struct + OrderNumber string + ResultingTrades []ResultTrades + type CancelOrder struct + Success int + type CandleStick struct + Close float64 + Date int64 + High float64 + Low float64 + Open float64 + QuoteVolume float64 + Volume float64 + WeightedAverage float64 + type Currency struct + Delisted int + DepositAddress string + Disabled int + Frozen int + Id int + MinConf decimal.Decimal + Name string + TxFee decimal.Decimal + type LoanOrder struct + Demands []LoanOrderSc + Offers []LoanOrderSc + type LoanOrderSc struct + Amount decimal.Decimal + RangeMax int + RangeMin int + Rate decimal.Decimal + type MarketUpdate struct + Data interface{} + TypeUpdate string + type NewAddress struct + Response string + Success int + type NewTrade struct + Amount float64 + Rate float64 + Total float64 + TradeId int64 + TypeOrder string + type OpenOrder struct + Amount decimal.Decimal + Date string + Margin int + OrderNumber string + Price decimal.Decimal + StartingAmount decimal.Decimal + Total decimal.Decimal + Type string + type OrderBook struct + Asks []Book + Bids []Book + IsFrozen string + Seq int + type OrderDepth struct + OrderBook struct{ ... } + Symbol string + type OrderStat struct + Amount decimal.Decimal + CurrencyPair string + Date string + Rate decimal.Decimal + StartingAmount decimal.Decimal + Status string + Total decimal.Decimal + Type string + type OrderStat1 struct + Result struct{ ... } + Success int + type OrderStat2 struct + Result map[string]OrderStat + Success int + type OrderTrade struct + Amount decimal.Decimal + Date string + Fee decimal.Decimal + GlobalTradeID decimal.Decimal + Market string + Price decimal.Decimal + Total decimal.Decimal + TradeID decimal.Decimal + Type string + type Poloniex struct + func NewClient(key, secret string) (client *Poloniex, err error) + func (p *Poloniex) Buy(market string, price, amount float64) (buy Buy, err error) + func (p *Poloniex) CancelOrder(orderNumber string) (cancelorder CancelOrder, err error) + func (p *Poloniex) GenerateNewAddress(currency string) (newaddress NewAddress, err error) + func (p *Poloniex) Get24hVolumes() (volumes Volume, err error) + func (p *Poloniex) GetAccountBalances() (accounts Accounts, err error) + func (p *Poloniex) GetAllOpenOrders() (openorders map[string][]OpenOrder, err error) + func (p *Poloniex) GetBalances() (balances map[string]string, err error) + func (p *Poloniex) GetChartData(market string, start, end time.Time, period string) (candles []CandleStick, err error) + func (p *Poloniex) GetCompleteBalances() (completebalances map[string]Balance, err error) + func (p *Poloniex) GetCurrencies() (currencies map[string]Currency, err error) + func (p *Poloniex) GetDepositAddresses() (depositaddresses map[string]string, err error) + func (p *Poloniex) GetLoanOrders(currency string) (loanorders LoanOrder, err error) + func (p *Poloniex) GetOpenOrders(market string) (openorders []OpenOrder, err error) + func (p *Poloniex) GetOrderBook(market string, depth int) (orderbook OrderBook, err error) + func (p *Poloniex) GetOrderStat(orderNumber string) (orderstat OrderStat, err error) + func (p *Poloniex) GetPublicTradeHistory(market string, args ...time.Time) (trades []PublicTrade, err error) + func (p *Poloniex) GetTickers() (tickers map[string]Ticker, err error) + func (p *Poloniex) GetTradeHistory(market string, start, end time.Time, limit int) (tradehistory []TradeHistory, err error) + func (p *Poloniex) GetTradesByOrderID(orderNumber string) (ordertrades []OrderTrade, err error) + func (p *Poloniex) Sell(market string, price, amount float64) (sell Sell, err error) + type PublicTrade struct + Amount decimal.Decimal + Date string + GlobalTradeID uint64 + Rate decimal.Decimal + Total decimal.Decimal + TradeID uint64 + Type string + type ResultTrades struct + Amount decimal.Decimal + Date string + Rate decimal.Decimal + Total decimal.Decimal + TradeID decimal.Decimal + Type string + type Sell Buy + type Ticker struct + BaseVolume decimal.Decimal + High24hr decimal.Decimal + HighestBid decimal.Decimal + ID int + IsFrozen int + Last decimal.Decimal + Low24hr decimal.Decimal + LowestAsk decimal.Decimal + PercentChange decimal.Decimal + QuoteVolume decimal.Decimal + type TradeHistory struct + Amount decimal.Decimal + Category string + Date string + Fee decimal.Decimal + GlobalTradeID int + OrderNumber decimal.Decimal + Price decimal.Decimal + Total decimal.Decimal + TradeID string + Type string + type Volume struct + TotalBTC float64 + TotalETH float64 + TotalUSDC float64 + TotalUSDT float64 + TotalXMR float64 + TotalXUSD float64 + Volumes map[string]map[string]decimal.Decimal + func (v *Volume) UnmarshalJSON(b []byte) error + type WSClient struct + Subs map[string]chan interface{} + func NewWSClient() (wsClient *WSClient, err error) + func (ws *WSClient) SubscribeMarket(chname string) error + func (ws *WSClient) SubscribeTicker() error + func (ws *WSClient) UnsubscribeMarket(chname string) error + func (ws *WSClient) UnsubscribeTicker() error + type WSOrderBook struct + Amount float64 + Rate float64 + TypeOrder string + type WSOrderBookModify WSOrderBook + type WSOrderBookRemove struct + Rate float64 + TypeOrder string + type WSTicker struct + BaseVolume float64 + High24hr float64 + HighestBid float64 + IsFrozen bool + Last float64 + Low24hr float64 + LowestAsk float64 + PercentChange float64 + QuoteVolume float64 + Symbol string