mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
* Remove LakeBTC exchange * Remove more LakeBTC remnants * Update LBank comment * go mod tiderinos * Remove LakeBTC from backup.json file
3.8 KiB
3.8 KiB
GoCryptoTrader OHLCV support
This exchanges package is part of the GoCryptoTrader codebase.
This is still in active development
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
Wrapper Methods
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(pair currency.Pair, a asset.Item, start, end time.Time, interval kline.Interval) (kline.Item, error) {
return kline.Item{}, common.ErrFunctionNotSupported
}
GetHistoricCandlesExtended that will make multiple requests to an exchange if the requested periods are outside exchange limits
func (b *base) GetHistoricCandlesExtended(pair currency.Pair, a asset.Item, start, end time.Time, interval kline.Interval) (kline.Item, error) {
return kline.Item{}, 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
}
DBSeed helper
A helper tool cmd/dbseed has been created for assisting with candle data migration
Exchange status
| Exchange | Supported |
|---|---|
| Binance | Y |
| Bitfinex | Y |
| Bitflyer | |
| Bithumb | Y |
| Bitmex | |
| Bitstamp | Y |
| BTC Markets | Y |
| Bittrex | |
| BTSE | Y |
| Coinbase Pro | Y |
| Coinbene | Y |
| Coinut | |
| Exmo | |
| GateIO | Y |
| Gemini | |
| HitBTC | Y |
| Huobi | Y |
| FTX | Y |
| itBIT | |
| Kraken | Y |
| lBank | Y |
| Localbitcoins | |
| Okcoin | Y |
| Okex | Y |
| Poloniex | Y |
| Yobit | |
| ZB | Y |