Documentation
¶
Index ¶
- Constants
- type ApiClient
- func (apiClient *ApiClient) GetAllOHLCVMarketData(symbol models.Symbol, interval time.Duration, startTime time.Time, ...) ([]*models.OHLCVMarketData, error)
- func (apiClient *ApiClient) GetExchangeIdentifier() string
- func (apiClient *ApiClient) GetOHLCVMarketData(symbol models.Symbol, interval time.Duration, startTime time.Time, ...) ([]*models.OHLCVMarketData, error)
- func (apiClient *ApiClient) GetRawMarketData() ([]*models.RawMarketData, error)
- func (apiClient *ApiClient) GetSupportedPairs() ([]*models.Symbol, error)
- type CandleStickData
- type ErrorResponse
- type ExchangeInfoResponse
- type Interval
- type Symbols
Constants ¶
View Source
const (
BINANCE = "BINANCE"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiClient ¶
func NewBinanceAPIClient ¶
func NewBinanceAPIClient() *ApiClient
func (*ApiClient) GetAllOHLCVMarketData ¶
func (apiClient *ApiClient) GetAllOHLCVMarketData( symbol models.Symbol, interval time.Duration, startTime time.Time, endTime time.Time, ) ([]*models.OHLCVMarketData, error)
GetAllOHLCVMarketData get CandleStick data from [startTime, endTime] with pagination
func (*ApiClient) GetExchangeIdentifier ¶
func (*ApiClient) GetOHLCVMarketData ¶
func (apiClient *ApiClient) GetOHLCVMarketData( symbol models.Symbol, interval time.Duration, startTime time.Time, endTime time.Time, ) ([]*models.OHLCVMarketData, error)
GetOHLCVMarketData get CandleStick data from [startTime, endTime]
func (*ApiClient) GetRawMarketData ¶
func (apiClient *ApiClient) GetRawMarketData() ([]*models.RawMarketData, error)
type CandleStickData ¶
type CandleStickData struct { OpenTime float64 OpenPrice float64 HighPrice float64 LowPrice float64 ClosePrice float64 Volume float64 CloseTime float64 QuoteAssetVolume float64 NumTrades float64 TakerBuyBaseAssetVolume float64 TakerBuyQuoteAssetVolume float64 }
CandleStickData https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#klinecandlestick-data
func (*CandleStickData) UnmarshalJSON ¶
func (candleStickResponse *CandleStickData) UnmarshalJSON( data []byte, ) (err error)
type ErrorResponse ¶
type ExchangeInfoResponse ¶
type ExchangeInfoResponse struct { Timezone string `json:"timezone"` ServerTime int64 `json:"serverTime"` Symbols []Symbols `json:"symbols"` }
ExchangeInfoResponse https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#exchange-information
type Symbols ¶
type Symbols struct { Symbol string `json:"symbol"` Status string `json:"status"` BaseAsset string `json:"baseAsset"` BaseAssetPrecision int `json:"baseAssetPrecision"` QuoteAsset string `json:"quoteAsset"` 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"` IsSpotTradingAllowed bool `json:"isSpotTradingAllowed"` IsMarginTradingAllowed bool `json:"isMarginTradingAllowed"` Permissions []string `json:"permissions"` }
Click to show internal directories.
Click to hide internal directories.