Skip to content

DEX

Bases: API

Client to fetch DEX data from DataMaxi+ API.

Parameters:

  • api_key (str, default: None ) –

    The DataMaxi+ API key

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

    Keyword arguments used by datamaxi.api.API.

trade

trade(
    chain: str,
    exchange: str,
    pool: str,
    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 DEX trade data

GET /api/v1/dex/trade

https://docs.datamaxiplus.com/rest/dex/trade

Parameters:

  • chain (str) –

    Chain name

  • exchange (str) –

    Exchange name

  • pool (str) –

    Pool name

  • 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]]

    DEX trade data in pandas DataFrame and next request function

candle

candle(
    chain: str,
    exchange: str,
    pool: str,
    interval: str = "1d",
    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 DEX candle data

GET /api/v1/dex/candle

https://docs.datamaxiplus.com/rest/dex/candle

Parameters:

  • chain (str) –

    Chain name

  • exchange (str) –

    Exchange name

  • pool (str) –

    Pool name

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

    Candle interval

  • 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]]

    DEX candle data in pandas DataFrame and next request function

liquidity

liquidity(
    chain: str,
    exchange: str,
    pool: str,
    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 DEX liquidity data

GET /api/v1/dex/liquidity

https://docs.datamaxiplus.com/rest/dex/liquidity

Parameters:

  • chain (str) –

    Chain name

  • exchange (str) –

    Exchange name

  • pool (str) –

    Pool name

  • 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]]

    DEX liquidity data in pandas DataFrame and next request function

chains

chains() -> List[str]

Fetch supported chains accepted by datamaxi.Dex.candle, datamaxi.Dex.trade and datamaxi.Dex.liquidity.

GET /api/v1/dex/chains

https://docs.datamaxiplus.com/rest/dex/chains

Returns:

  • List[str]

    List of supported chains

exchanges

exchanges() -> List[str]

Fetch supported exchanges accepted by datamaxi.Dex.candle, datamaxi.Dex.trade and datamaxi.Dex.liquidity.

GET /api/v1/dex/exchanges

https://docs.datamaxiplus.com/rest/dex/exchanges

Returns:

  • List[str]

    List of supported exchanges

pools

pools(
    exchange: str = None, chain: str = None
) -> List[Dict]

Fetch supported pools accepted by datamaxi.Dex.candle, datamaxi.Dex.trade and datamaxi.Dex.liquidity.

GET /api/v1/dex/pools

https://docs.datamaxiplus.com/rest/dex/pools

Parameters:

  • exchange (str, default: None ) –

    Exchange name

  • chain (str, default: None ) –

    Chain name (applied to DEX only)

Returns:

  • List[Dict]

    List of supported pools

intervals

intervals() -> List[str]

Fetch supported intervals accepted by datamaxi.Dex.candle.

GET /api/v1/dex/intervals

https://docs.datamaxiplus.com/rest/dex/intervals

Returns:

  • List[str]

    List of supported intervals