cryptodatapy.extract.params.libraries.ccxt_param_converter

Attributes

logger

Classes

CCXTParamConverter

Converts a standard DataRequest object into the specific set of parameters

Module Contents

cryptodatapy.extract.params.libraries.ccxt_param_converter.logger
class cryptodatapy.extract.params.libraries.ccxt_param_converter.CCXTParamConverter(data_req: cryptodatapy.core.data_request.DataRequest)

Bases: cryptodatapy.extract.params.base_param_converter.BaseParamConverter

Converts a standard DataRequest object into the specific set of parameters required by a CCXT-supported exchange (e.g., Binance, KuCoin).

_convert_exchange(mkt_type: str, exch: str) str

Converts the standard exchange name to the CCXT-specific ID based on the market type (spot vs. futures).

_convert_dates() Tuple[int, int]

Converts start and end dates to Unix timestamps in milliseconds (CCXT standard).

Leverages the base class utility (super()._convert_dates) to handle normalization, defaults, and formatting based on the specified parameters.

Returns:

(source_start_date_ms, source_end_date_ms)

Return type:

Tuple[int, int]

_get_required_methods() List[str]

Identifies which CCXT methods are needed based on requested fields.

convert() Dict[str, Any]

Orchestrates all conversions and compiles the final dictionary of CCXT parameters.

Returns:

A dictionary containing vendor-specific parameters.

Return type:

Dict[str, Any]