Skip to content

CEX Orderbook

Bases: API

Client to fetch orderbook 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, pandas: bool = True
) -> Union[Dict, pd.DataFrame]

Fetch orderbook data

GET /api/v1/orderbook

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

Parameters:

  • exchange (str) –

    Exchange name

  • symbol (str) –

    symbol name

  • pandas (bool, default: True ) –

    Return data as pandas DataFrame

Returns:

  • Union[Dict, DataFrame]

    CexOrderbook data in pandas DataFrame

exchanges

exchanges() -> List[str]

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

GET /api/v1/orderbook/exchanges

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

Returns:

  • List[str]

    List of supported exchange

symbols

symbols(exchange: str) -> List[str]

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

GET /api/v1/orderbook/symbols

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

Parameters:

  • exchange (str) –

    Exchange name

Returns:

  • List[str]

    List of supported symbols