Documentation
¶
Index ¶
- func NewBinance(config *qsx.Config) (qsx.IExchange, error)
- type Binance
- func (b *Binance) GetHistoricalCandles(ctx context.Context, productID string, granularity string) ([]qsx.Candle, error)
- func (b *Binance) GetKlineData(ctx context.Context, params KLineParameters) (KLineResponse, error)
- func (b *Binance) ListProducts(ctx context.Context) ([]qsx.Product, error)
- func (b *Binance) WatchFeed(shutdown chan struct{}, wg *sync.WaitGroup, product string, feed interface{}) (*orderbook.Orderbook, error)
- type KLineParameters
- type KLineResponse
- type Kline
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Binance ¶
func (*Binance) GetHistoricalCandles ¶
func (*Binance) GetKlineData ¶
func (b *Binance) GetKlineData(ctx context.Context, params KLineParameters) (KLineResponse, error)
func (*Binance) ListProducts ¶
type KLineParameters ¶
type KLineParameters struct {
Symbol string `json:"symbol"`
Interval string `json:"interval"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Limit int `json:"limit"`
}
func (*KLineParameters) Params ¶
func (h *KLineParameters) Params() []string
type KLineResponse ¶
type KLineResponse []Kline
type Kline ¶
type Kline struct {
OpenTime time.Time `json:"openTime"`
Open string `json:"open"`
High string `json:"high"`
Low string `json:"low"`
Close string `json:"close"`
Volume string `json:"volume"`
CloseTime time.Time `json:"closeTime"`
QuoteAssetVolume string `json:"quoteAssetVolume"`
TradeNum int64 `json:"tradeNum"`
TakerBuyBaseAssetVolume string `json:"takerBuyBaseAssetVolume"`
TakerBuyQuoteAssetVolume string `json:"takerBuyQuoteAssetVolume"`
}
Click to show internal directories.
Click to hide internal directories.