This exchanges package is part of the GoCryptoTrader codebase.
You can track ideas, planned features and what's in progress on this Trello board: https://trello.com/b/ZAhMhpOy/gocryptotrader.
Join our slack to discuss all things related to GoCryptoTrader! GoCryptoTrader Slack
Candle retrieval is handled by two methods
GetHistoricCandles which makes a single request to the exchange and follows all exchange limitations
func (b *base) GetHistoricCandles(ctx context.Context, pair currency.Pair, a asset.Item, interval kline.Interval, start, end time.Time) (*kline.Item, error) {
return nil, common.ErrFunctionNotSupported
}
GetHistoricCandlesExtended that will make multiple requests to an exchange if the requested periods are outside exchange limits
func (b *base) GetHistoricCandlesExtended(ctx context.Context, pair currency.Pair, a asset.Item, interval kline.Interval, start, end time.Time) (*kline.Item, error) {
return nil, common.ErrFunctionNotSupported
}
both methods return kline.Item{}
// Item holds all the relevant information for internal kline elements
type Item struct {
Exchange string
Pair currency.Pair
Asset asset.Item
Interval Interval
Candles []Candle
}
// Candle holds historic rate information.
type Candle struct {
Time time.Time
Open float64
High float64
Low float64
Close float64
Volume float64
}
A helper tool cmd/dbseed has been created for assisting with candle data migration
Exchange | Supported |
---|---|
Binance.US | Y |
Binance | Y |
Bitfinex | Y |
Bitflyer | |
Bithumb | Y |
Bitmex | |
Bitstamp | Y |
BTC Markets | Y |
BTSE | Y |
Bybit | Y |
Coinbase Pro | Y |
Coinut | |
Deribit | Y |
Exmo | |
GateIO | Y |
Gemini | |
HitBTC | Y |
Huobi | Y |
Kraken | Y |
Kucoin | Y |
lBank | Y |
Okcoin | Y |
Okx | Y |
Poloniex | Y |
Yobit |