Candles
Candle data can be accessed through the Runtime through the candle_topics
parameter in RuntimeConfig
.
A topic
in cybotrade refers to a unique referencing string that correlates to a particular candle or datasource topic.
Candle topic(s) are set with the following format
{exchange-market}|candles?{interval}&{symbol}
Intervals
The currently available intervals are as such:
1m, 3m, 5m, 15m, 30m,
1h, 2h, 4h, 8h, 12h,
1d, 3d, 1w, 1M
Exchange Support
The table below shows the currently supported exchanges.
Order Placement & API refers to the capability to interact with said Exchange (market) through the Cybotrade runtime.
Candle Data refers to the capability to retrieve candle data through Cybotrade.
Exchange | Order Placement & API | Candle Data |
---|---|---|
Bitget (linear) | ✅ | ✅ |
Bybit (linear) | ✅ | ✅ |
Binance (linear) | ✅ | ✅ |
Okx (linear) | ✅ | ✅ |
Zoomex (linear) | ✅ | ✅ |
Bitget (spot) | ❌ | ✅ |
Bybit (spot) | ❌ | ✅ |
Binance (spot) | ❌ | ✅ |
Okx (spot) | ❌ | ✅ |
Zoomex (spot) | ❌ | ✅ |
All linear-market exchange candle 'topics' are postfixed with '-linear'. For an example: bybit-linear|candles?interval=1m&symbol=BTC/USDT
denotes that it is bybit linear. As for spot candles it will be bybit-spot|candles?interval=1m&symbol=BTCUSDT
.
Setting topics in the RuntimeConfig
Below are examples of how to format a linear candle topic:
"bybit-linear|candles?interval=5m&symbol=BTCUSDT"
"binance-linear|candles?interval=1m&symbol=ETHUSDT"
"bitget-linear|candles?interval=12h&symbol=AVAXUSDT"
While formating spot candle topic(s) comes with a minor difference:
"bybit-spot|candles?interval=5m&symbol=BTCUSDT"
"binance-spot|candles?interval=1m&symbol=ETHUSDT"
"bitget-spot|candles?interval=12h&symbol=AVAXUSDT"
In order to use these topics, you can insert the desired topic into the candle_topics
parameter of the RuntimeConfig
like such:
config = RuntimeConfig(
candle_topics=[
"bybit-spot|candles?interval=1m&symbol=ETHUSDT",
"bybit-spot|candles?interval=1d&symbol=BTCUSDT",
"binance-linear|candles?interval=12h&symbol=AVAXUSDT"
],
...
)