Capability¶
Defined in dccd.domain.capability
- class Capability(*, data_type, transport, mode, history='full', max_per_request=None, page_direction=None, spans=None, max_depth=None, auth_required=False)[source]
Bases:
BaseModelDeclares one atomic capability of a source adapter.
- Attributes:
- data_typeDataType
- transport‘rest’ or ‘ws’
- mode‘historical’ or ‘live’
- history‘full’ or ‘recent’
For historical REST:
'full'means the source covers the entire available exchange history;'recent'means only the last N bars are accessible (e.g. Kraken OHLC = 720 recent bars).- max_per_requestint or None
Maximum items per API call (drives Paginator step size).
- page_direction‘forward’, ‘backward’, or None
Pagination direction.
Nonefor single-shot / WS sources.- spanslist[int] or None
Supported OHLC spans in seconds.
None= span list not constrained.- max_depthint or None
Maximum order book depth.
- auth_requiredbool
Whether this capability requires authentication.
Examples
>>> from dccd.domain.types import DataType >>> cap = Capability(data_type=DataType.OHLC, transport='rest', mode='historical', max_per_request=1000) >>> cap.history 'full'