Documentation ¶
Index ¶
- Constants
- func ExchangeInformationData(connRest ConnectorRest, parm ExchangeInformationParam) ([]byte, error)
- func OrderBookData(connRest ConnectorRest, parm OrderBookParam) ([]byte, error)
- func Ticker24hrData(connRest ConnectorRest, parm Ticker24hrParam) ([]byte, error)
- func TimeData(connRest ConnectorRest) ([]byte, error)
- type ExchangeFilters
- type ExchangeInformationParam
- type ExchangeInformationResp
- type OrderBookParam
- type OrderBookResp
- type RateLimits
- type Symbol
- type SymbolFilters
- type Ticker24hrParam
- type Ticker24hrResp
- type TimeResp
Constants ¶
View Source
const (
// https://binance-docs.github.io/apidocs/spot/en/#exchange-information
EndpointExchangeInfo = "/api/v3/exchangeInfo"
)
View Source
const (
// https://binance-docs.github.io/apidocs/spot/en/#order-book
EndpointOrderBook = "/api/v3/depth"
)
View Source
const (
// https://binance-docs.github.io/apidocs/spot/en/#24hr-ticker-price-change-statistics
EndpointTicker24hr = "/api/v3/ticker/24hr"
)
View Source
const (
// https://binance-docs.github.io/apidocs/spot/en/#check-server-time
EndpointTime = "/api/v3/time"
)
Variables ¶
This section is empty.
Functions ¶
func ExchangeInformationData ¶
func ExchangeInformationData(connRest ConnectorRest, parm ExchangeInformationParam) ([]byte, error)
func OrderBookData ¶
func OrderBookData(connRest ConnectorRest, parm OrderBookParam) ([]byte, error)
func Ticker24hrData ¶
func Ticker24hrData(connRest ConnectorRest, parm Ticker24hrParam) ([]byte, error)
Types ¶
type ExchangeFilters ¶
type ExchangeInformationResp ¶
type ExchangeInformationResp struct { Timezone string `json:"timezone"` ServerTime int64 `json:"serverTime"` RateLimits []RateLimits `json:"rateLimits"` ExchangeFilters []ExchangeFilters `json:"exchangeFilters"` Symbols []Symbol `json:"symbols"` }
func ExchangeInformation ¶
func ExchangeInformation(connRest ConnectorRest, parm ExchangeInformationParam) (ExchangeInformationResp, error)
type OrderBookParam ¶
type OrderBookResp ¶
type OrderBookResp struct { LastUpdateID int `json:"lastUpdateId"` Bids [][]string `json:"bids"` Asks [][]string `json:"asks"` }
func OrderBook ¶
func OrderBook(connRest ConnectorRest, parm OrderBookParam) (OrderBookResp, error)
type RateLimits ¶
type RateLimits struct { RateLimitType string `json:"rateLimitType"` Interval string `json:"interval"` IntervalNum int `json:"intervalNum"` Limit int `json:"limit"` }
https://binance-docs.github.io/apidocs/spot/en/#public-api-definitions
type Symbol ¶
type Symbol struct { Symbol string `json:"symbol"` Status string `json:"status"` BaseAsset string `json:"baseAsset"` BaseAssetPrecision int `json:"baseAssetPrecision"` QuoteAsset string `json:"quoteAsset"` QuotePrecision int `json:"quotePrecision"` QuoteAssetPrecision int `json:"quoteAssetPrecision"` BaseCommissionPrecision int `json:"baseCommissionPrecision"` QuoteCommissionPrecision int `json:"quoteCommissionPrecision"` OrderTypes []string `json:"orderTypes"` IcebergAllowed bool `json:"icebergAllowed"` OcoAllowed bool `json:"ocoAllowed"` QuoteOrderQtyMarketAllowed bool `json:"quoteOrderQtyMarketAllowed"` AllowTrailingStop bool `json:"allowTrailingStop"` CancelReplaceAllowed bool `json:"cancelReplaceAllowed"` IsSpotTradingAllowed bool `json:"isSpotTradingAllowed"` IsMarginTradingAllowed bool `json:"isMarginTradingAllowed"` Filters []SymbolFilters `json:"filters"` Permissions []string `json:"permissions"` DefaultSelfTradePreventionMode string `json:"defaultSelfTradePreventionMode"` AllowedSelfTradePreventionModes []string `json:"allowedSelfTradePreventionModes"` }
type SymbolFilters ¶
type SymbolFilters struct { FilterType string `json:"filterType"` MinPrice string `json:"minPrice"` MaxPrice string `json:"maxPrice"` TickSize string `json:"tickSize"` MultiplierUp string `json:"multiplierUp"` MultiplierDown string `json:"multiplierDown"` AvgPriceMins int `json:"avgPriceMins"` BidMultiplierUp string `json:"bidMultiplierUp"` BidMultiplierDown string `json:"bidMultiplierDown"` AskMultiplierUp string `json:"askMultiplierUp"` AskMultiplierDown string `json:"askMultiplierDown"` MinQty string `json:"minQty"` MaxQty string `json:"maxQty"` StepSize string `json:"stepSize"` MinNotional string `json:"minNotional"` ApplyMinToMarket bool `json:"applyMinToMarket"` MaxNotional string `json:"maxNotional"` ApplyMaxToMarket bool `json:"applyMaxToMarket"` ApplyToMarket bool `json:"applyToMarket"` Limit int `json:"limit"` MinTrailingAboveDelta int `json:"minTrailingAboveDelta"` MaxTrailingAboveDelta int `json:"maxTrailingAboveDelta"` MinTrailingBelowDelta int `json:"minTrailingBelowDelta"` MaxTrailingBelowDelta int `json:"maxTrailingBelowDelta"` MaxNumOrders int `json:"maxNumOrders"` MaxNumAlgoOrders int `json:"maxNumAlgoOrders"` MaxNumIcebergOrders int `json:"maxNumIcebergOrders"` MaxPosition string `json:"maxPosition"` }
type Ticker24hrParam ¶
type Ticker24hrResp ¶
type Ticker24hrResp struct { Symbol string `json:"symbol"` PriceChange string `json:"priceChange"` PriceChangePercent string `json:"priceChangePercent"` WeightedAvgPrice string `json:"weightedAvgPrice"` PrevClosePrice string `json:"prevClosePrice"` LastPrice string `json:"lastPrice"` LastQty string `json:"lastQty"` BidPrice string `json:"bidPrice"` BidQty string `json:"bidQty"` AskPrice string `json:"askPrice"` AskQty string `json:"askQty"` OpenPrice string `json:"openPrice"` HighPrice string `json:"highPrice"` LowPrice string `json:"lowPrice"` Volume string `json:"volume"` QuoteVolume string `json:"quoteVolume"` OpenTime int64 `json:"openTime"` CloseTime int64 `json:"closeTime"` FirstID int `json:"firstId"` LastID int `json:"lastId"` Count int `json:"count"` }
func Ticker24hr ¶
func Ticker24hr(connRest ConnectorRest, parm Ticker24hrParam) ([]Ticker24hrResp, error)
Click to show internal directories.
Click to hide internal directories.