Documentation ¶
Index ¶
- Constants
- type AggTrade
- type Binance
- func (bn *Binance) CancelOrder(orderId string, currencyPair CurrencyPair) (bool, error)
- func (bn *Binance) GetAccount() (*Account, error)
- func (bn *Binance) GetDepth(size int, currencyPair CurrencyPair) (*Depth, error)
- func (bn *Binance) GetExchangeName() string
- func (bn *Binance) GetKlineRecords(currency CurrencyPair, period, size, since int) ([]Kline, error)
- func (bn *Binance) GetOneOrder(orderId string, currencyPair CurrencyPair) (*Order, error)
- func (bn *Binance) GetOrderHistorys(currency CurrencyPair, currentPage, pageSize int) ([]Order, error)
- func (bn *Binance) GetTicker(currency CurrencyPair) (*Ticker, error)
- func (bn *Binance) GetTradeSymbols(currencyPair CurrencyPair) (*TradeSymbol, error)
- func (bn *Binance) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)
- func (bn *Binance) GetUnfinishOrders(currencyPair CurrencyPair) ([]Order, error)
- func (bn *Binance) LimitBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bn *Binance) LimitSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bn *Binance) MarketBuy(amount, price string, currencyPair CurrencyPair) (*Order, error)
- func (bn *Binance) MarketSell(amount, price string, currencyPair CurrencyPair) (*Order, error)
- type BinanceWs
- func (bnWs *BinanceWs) ProxyUrl(proxyUrl string)
- func (bnWs *BinanceWs) SetBaseUrl(baseURL string)
- func (bnWs *BinanceWs) SetCallbacks(tickerCallback func(*Ticker), depthCallback func(*Depth), ...)
- func (bnWs *BinanceWs) SetCombinedBaseURL(combinedBaseURL string)
- func (bnWs *BinanceWs) SubscribeAggTrade(pair CurrencyPair, tradeCallback func(*Trade)) error
- func (bnWs *BinanceWs) SubscribeDepth(pair CurrencyPair, size int) error
- func (bnWs *BinanceWs) SubscribeDiffDepth(pair CurrencyPair, depthCallback func(*Depth)) error
- func (bnWs *BinanceWs) SubscribeKline(pair CurrencyPair, period int) error
- func (bnWs *BinanceWs) SubscribeTicker(pair CurrencyPair) error
- func (bnWs *BinanceWs) SubscribeTrade(pair CurrencyPair) error
- type DiffDepth
- type ExchangeInfo
- type Filter
- type RateLimit
- type RawTrade
- type TradeSymbol
Constants ¶
View Source
const ( API_BASE_URL = "https://api.binance.com/" API_V1 = API_BASE_URL + "api/v1/" API_V3 = API_BASE_URL + "api/v3/" TICKER_URI = "ticker/24hr?symbol=%s" TICKERS_URI = "ticker/allBookTickers" DEPTH_URI = "depth?symbol=%s&limit=%d" ACCOUNT_URI = "account?" ORDER_URI = "order?" UNFINISHED_ORDERS_INFO = "openOrders?" KLINE_URI = "klines" SERVER_TIME_URL = "api/v1/time" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binance ¶
type Binance struct {
// contains filtered or unexported fields
}
func (*Binance) CancelOrder ¶
func (*Binance) GetAccount ¶
func (*Binance) GetExchangeName ¶
func (*Binance) GetKlineRecords ¶
func (*Binance) GetOneOrder ¶
func (*Binance) GetOrderHistorys ¶
func (*Binance) GetTradeSymbols ¶ added in v1.0.3
func (bn *Binance) GetTradeSymbols(currencyPair CurrencyPair) (*TradeSymbol, error)
func (*Binance) GetUnfinishOrders ¶
func (*Binance) MarketSell ¶
type BinanceWs ¶ added in v1.0.3
type BinanceWs struct {
// contains filtered or unexported fields
}
func NewBinanceWs ¶ added in v1.0.3
func NewBinanceWs() *BinanceWs
func (*BinanceWs) SetBaseUrl ¶ added in v1.0.3
func (*BinanceWs) SetCallbacks ¶ added in v1.0.3
func (*BinanceWs) SetCombinedBaseURL ¶ added in v1.0.3
func (*BinanceWs) SubscribeAggTrade ¶ added in v1.0.4
func (*BinanceWs) SubscribeDepth ¶ added in v1.0.3
func (*BinanceWs) SubscribeDiffDepth ¶ added in v1.0.4
func (*BinanceWs) SubscribeKline ¶ added in v1.0.3
func (*BinanceWs) SubscribeTicker ¶ added in v1.0.3
func (*BinanceWs) SubscribeTrade ¶ added in v1.0.3
type ExchangeInfo ¶ added in v1.0.3
type ExchangeInfo struct { Timezone string `json:"timezone"` ServerTime int `json:"serverTime"` ExchangeFilters []interface{} `json:"exchangeFilters,omitempty"` RateLimits []RateLimit `json:"rateLimits"` Symbols []TradeSymbol `json:"symbols"` }
type TradeSymbol ¶ added in v1.0.3
type TradeSymbol struct { BaseAsset string `json:"baseAsset"` BaseAssetPrecision int `json:"baseAssetPrecision"` Filters []Filter `json:"filters"` IcebergAllowed bool `json:"icebergAllowed"` IsMarginTradingAllowed bool `json:"isMarginTradingAllowed"` IsSpotTradingAllowed bool `json:"isSpotTradingAllowed"` OcoAllowed bool `json:"ocoAllowed"` OrderTypes []string `json:"orderTypes"` QuoteAsset string `json:"quoteAsset"` QuotePrecision int `json:"quotePrecision"` Status string `json:"status"` Symbol string `json:"symbol"` }
Click to show internal directories.
Click to hide internal directories.