Skip to content

CEX Candle

Bases: API

Client to fetch CEX candle data from DataMaxi+ API.

Parameters:

  • api_key (str, default: None ) –

    The DataMaxi+ API key

  • **kwargs (Any, default: {} ) –

    Keyword arguments used by datamaxi.api.API.

get

get(
    exchange: str,
    symbol: str,
    interval: str = "1d",
    market: str = "spot",
    page: int = 1,
    limit: int = 1000,
    fromDateTime: str = None,
    toDateTime: str = None,
    sort: str = "desc",
    pandas: bool = True,
) -> Union[
    Tuple[Dict, Callable], Tuple[pd.DataFrame, Callable]
]

Fetch candle data

GET /api/v1/cex/candle

https://docs.datamaxiplus.com/rest/cex/candle/data

Parameters:

  • exchange (str) –

    Exchange name

  • symbol (str) –

    Symbol name

  • interval (str, default: '1d' ) –

    Candle interval

  • market (str, default: 'spot' ) –

    Market type (spot/futures)

  • page (int, default: 1 ) –

    Page number

  • limit (int, default: 1000 ) –

    Limit of data

  • fromDateTime (str, default: None ) –

    Start date and time (accepts format "2006-01-02 15:04:05" or "2006-01-02")

  • toDateTime (str, default: None ) –

    End date and time (accepts format "2006-01-02 15:04:05" or "2006-01-02")

  • sort (str, default: 'desc' ) –

    Sort order

  • pandas (bool, default: True ) –

    Return data as pandas DataFrame

Returns:

  • Union[Tuple[Dict, Callable], Tuple[DataFrame, Callable]]

    Candle data in pandas DataFrame and next request function

exchanges

exchanges(market: str = 'spot') -> List[str]

Fetch supported exchanges accepted by datamaxi.CexCandle.get API.

GET /api/v1/cex/candle/exchanges

https://docs.datamaxiplus.com/rest/cex/candle/exchanges

Parameters:

  • market (str, default: 'spot' ) –

    Market type (spot/futures)

Returns:

  • List[str]

    List of supported exchanges

symbols

symbols(
    exchange: str = None, market: str = None
) -> List[Dict]

Fetch supported symbols accepted by datamaxi.CexCandle.get API.

GET /api/v1/cex/candle/symbols

https://docs.datamaxiplus.com/rest/cex/candle/symbols

Parameters:

  • exchange (str, default: None ) –

    Exchange name

  • market (str, default: None ) –

    Market type (spot/futures)

Returns:

  • List[Dict]

    List of supported symbols

intervals

intervals() -> List[str]

Fetch supported intervals accepted by datamaxi.CexCandle.get API.

GET /api/v1/candle/intervals

https://docs.datamaxiplus.com/rest/cex/candle/intervals

Returns:

  • List[str]

    List of supported intervals