Bybit¶
Capabilities¶
Backfill: OHLC (full), order-book snapshot. No trades.
Stream: OHLC, trades, order book.
OHLC fidelity:
quote_volume✅ native ·trades— null.
Note
Bybit spot exposes only the ~60 most recent trades and no history, so trades
backfill raises NoCapability rather than
returning a misleading recent slice. Live trades are available via the stream.
Symbols¶
BTCUSDT (no separator), spot category.
Example¶
async with Client() as c:
await c.backfill("bybit", "BTC/USDT", "ohlc", span=3600, start="2024-01-01")
API¶
- class BybitSource(http=None)[source]¶
Bybit source adapter (spot).
Backfill: OHLC (full), order-book snapshot. No trades (see Notes).
Stream: OHLC, trades, order book.
See also
dccd.Clientthe public facade.
Notes
Bybit spot exposes only the ~60 most recent trades and no history, so
TradesHistoryis deliberately not implemented — a trades backfill raisesNoCapabilityrather than returning a misleading recent slice. Live trades are still available via the stream.Examples
>>> from dccd.sources.bybit import BybitSource >>> BybitSource().capability_for(DataType.TRADES, 'rest', 'historical') is None True
- async fetch_ohlc_page(symbol, span, start_ns, end_ns, limit)[source]¶
Fetch one page of OHLC bars (see
fetch_ohlc_page).