Versions in this module Expand all Collapse all v1 v1.0.6 Sep 5, 2021 v1.0.5 Apr 5, 2021 Changes in this version + const BaseUrl + var IntervalEnum = map[string]bool + var OrderSideEnum = map[string]bool + var OrderTIFEnum = map[string]bool + var OrderTypeEnum = map[string]bool + type Account struct + Balances []Balance + BuyerCommission int64 + CanDeposit bool + CanTrade bool + CanWithdraw bool + MakerCommission int64 + SellerCommission int64 + TakerCommission int64 + type AggTrade struct + BestMatch bool + FirstTradeId int64 + LastTradeId int64 + Maker bool + Price float64 + Quantity float64 + Timestamp int64 + TradeId int64 + type AllOrdersQuery struct + Limit int64 + OrderId int64 + RecvWindow int64 + Symbol string + func (q *AllOrdersQuery) ValidateAllOrdersQuery() error + type AssetDetail struct + DepositStatus bool + DepositTip string + MinWithdrawAmount decimal.Decimal + WithdrawFee decimal.Decimal + WithdrawStatus bool + type AssetDetailList struct + AssetDetail map[string]AssetDetail + type BadRequest struct + Code int64 + Msg string + type Balance struct + Asset string + Free decimal.Decimal + Locked decimal.Decimal + type Binance struct + func New(key, secret string) *Binance + func (b *Binance) CancelOrder(query OrderQuery) (order CanceledOrder, err error) + func (b *Binance) CheckOrder(query OrderQuery) (status OrderStatus, err error) + func (b *Binance) Get24Hr(q SymbolQuery) (changeStats ChangeStats, err error) + func (b *Binance) GetAccountInfo() (account Account, err error) + func (b *Binance) GetAggTrades(q SymbolQuery) (trades []AggTrade, err error) + func (b *Binance) GetAllOpenOrders() (orders []OrderStatus, err error) + func (b *Binance) GetAllOrders(query AllOrdersQuery) (orders []OrderStatus, err error) + func (b *Binance) GetAllPrices() (prices []TickerPrice, err error) + func (b *Binance) GetAssetDetail() (assetDetail AssetDetailList, err error) + func (b *Binance) GetBookTickers() (booktickers []BookTicker, err error) + func (b *Binance) GetDepositHistory() (deposits DepositList, err error) + func (b *Binance) GetExchangeInfo() (exchangeinfo ExchangeInfo, err error) + func (b *Binance) GetKlines(q KlineQuery) (klines []Kline, err error) + func (b *Binance) GetLastPrice(q SymbolQuery) (price TickerPrice, err error) + func (b *Binance) GetOpenOrders(query OpenOrdersQuery) (orders []OrderStatus, err error) + func (b *Binance) GetOrderBook(q OrderBookQuery) (book OrderBook, err error) + func (b *Binance) GetPositions() (positions []*Balance, err error) + func (b *Binance) GetTrades(symbol string) (trades []Trade, err error) + func (b *Binance) GetWithdrawHistory() (withdraws WithdrawList, err error) + func (b *Binance) GetWithdrawalSystemStatus() (withdrawalSystemStatus WithdrawalSystemStatus, err error) + func (b *Binance) Ping() (pingResponse PingResponse, err error) + func (b *Binance) PlaceLimitOrder(l LimitOrder) (res PlacedOrder, err error) + func (b *Binance) PlaceMarketOrder(m MarketOrder) (res PlacedOrder, err error) + func (c *Binance) NewUserWSChannel() (err error, accountUpdate chan *WSAccountUpdate, ...) + func (c *Binance) StopUserWSChannel() error + func (c *Binance) UpdateUserWSChannel(done *DoneChannel) + type BookTicker struct + AskPrice decimal.Decimal + AskQuantity decimal.Decimal + BidPrice decimal.Decimal + BidQuantity decimal.Decimal + Symbol string + type CanceledOrder struct + ClientOrderId string + OrderId int64 + OrigClientOrderId string + Symbol string + type ChangeStats struct + AskPrice float64 + BidPrice float64 + CloseTime int64 + Count int64 + FirstId int64 + HighPrice float64 + LastId int64 + LastPrice float64 + LowPrice float64 + OpenPrice float64 + OpenTime int64 + PrevClosePrice float64 + PriceChange float64 + PriceChangePercent float64 + Volume float64 + WeightedAvgPrice float64 + type Client struct + func NewClient(key, secret string) (c *Client) + type Deposit struct + Address string + Amount float64 + Asset string + InsertTime int64 + Status int64 + TxId string + type DepositList struct + Deposits []Deposit + type DoneChannel struct + func NewDoneChannel() *DoneChannel + func (d *DoneChannel) Close() + func (d DoneChannel) IsClosed() bool + func (d DoneChannel) Read() <-chan interface{} + func (d DoneChannel) Write(data interface{}) bool + type ExchangeInfo struct + ExchangeFilters []string + RateLimits []RateLimit + ServerTime int64 + Symbols []SymbolInfo + TimeZone string + type Kline struct + Close float64 + CloseTime int64 + High float64 + Low float64 + NumTrades int64 + Open float64 + OpenTime int64 + QuoteVolume float64 + TakerBaseVolume float64 + TakerQuoteVolume float64 + Volume float64 + func (k *Kline) UnmarshalJSON(b []byte) error + type KlineQuery struct + Interval string + Limit int64 + Symbol string + func (q *KlineQuery) ValidateKlineQuery() error + type LimitOrder struct + Price decimal.Decimal + Quantity decimal.Decimal + RecvWindow int64 + Side string + Symbol string + TimeInForce string + Type string + func (l *LimitOrder) ValidateLimitOrder() error + type MarketOrder struct + Quantity float64 + RecvWindow int64 + Side string + Symbol string + Type string + func (m *MarketOrder) ValidateMarketOrder() error + type OpenOrdersQuery struct + RecvWindow int64 + Symbol string + func (q *OpenOrdersQuery) ValidateOpenOrdersQuery() error + type Order struct + Price float64 + Quantity float64 + func (o *Order) UnmarshalJSON(b []byte) error + type OrderBook struct + Asks []Order + Bids []Order + LastUpdatedId int64 + type OrderBookQuery struct + Limit int64 + Symbol string + func (q *OrderBookQuery) ValidateOrderBookQuery() error + type OrderQuery struct + OrderId string + RecvWindow int64 + Symbol string + func (q *OrderQuery) ValidateOrderQuery() error + type OrderStatus struct + ClientOrderId string + ExecutedQty float64 + IcebergQty float64 + OrderId int64 + OrigQty float64 + Price float64 + Side string + Status string + StopPrice float64 + Symbol string + Time int64 + TimeInForce string + Type string + type PingResponse struct + type PlacedOrder struct + ClientOrderId string + OrderId int64 + Status string + Symbol string + TransactTime int64 + type RateLimit struct + Interval string + Limit int64 + RateLimitType string + type SymbolFilter struct + MaxPrice float64 + MaxQty float64 + MinNotional float64 + MinPrice float64 + MinQty float64 + StepSize float64 + TickSize float64 + Type string + type SymbolInfo struct + BaseAsset string + BaseAssetPrecision int64 + Filters []SymbolFilter + IceBergAllowed bool + OrderTypes []string + QuoteAsset string + QuotePrecision int64 + Status string + Symbol string + type SymbolQuery struct + Symbol string + func (q *SymbolQuery) ValidateSymbolQuery() error + type SystemStatus int64 + const SystemStatusMaintenance + const SystemStatusNormal + type TickerPrice struct + Price float64 + Symbol string + type Trade struct + Commission float64 + CommissionAsset string + Id int64 + IsBestMatch bool + IsBuyer bool + IsMaker bool + Price float64 + Quantity float64 + Time int64 + type WSAccountUpdate struct + Balance []*Balance + type WSOrderUpdate struct + CommissionAmount decimal.Decimal + CommissionAsset *string + CumulativeFilledQuantity decimal.Decimal + CumulativeQuoteAssetTransactedQuantity decimal.Decimal + CurrentExecutionType string + CurrentOrderStatus string + EventTime int64 + EventType string + IcebergQuantity decimal.Decimal + Ignore2 int64 + IsOrderWorking bool + LastExecutedPrice decimal.Decimal + LastExecutedQuantity decimal.Decimal + LastQuoteAssetTransactedQuantity decimal.Decimal + OrderCreationTime int64 + OrderID int64 + OrderPrice decimal.Decimal + OrderQuantity decimal.Decimal + OrderType string + Q decimal.Decimal + Side string + StopPrice decimal.Decimal + Symbol string + TimeInForce string + TradeID int64 + TransactionTime int64 + type Withdraw struct + Address string + Amount float64 + ApplyTime int64 + Asset string + Id string + Status int64 + TxId string + type WithdrawList struct + Withdraws []Withdraw + type WithdrawalSystemStatus struct + Msg string + Status SystemStatus