Skip to content

CEX Fees

Trading fee schedules for centralized exchanges.

Usage

Sync
from datamaxi import Datamaxi

maxi = Datamaxi(api_key="YOUR_API_KEY")

exchanges = maxi.cex.fee.exchanges()
symbols = maxi.cex.fee.symbols(exchange="binance")

fees = maxi.cex.fee(exchange="binance", symbol="BTC-USDT")
Async
import asyncio
from datamaxi.aio import AsyncDatamaxi


async def main():
    async with AsyncDatamaxi(api_key="YOUR_API_KEY") as client:
        exchanges = await client.cex.fee.exchanges()
        symbols = await client.cex.fee.symbols(exchange="binance")

        fees = await client.cex.fee(exchange="binance", symbol="BTC-USDT")


asyncio.run(main())

Notes

  • You can omit symbol to get all symbols for the exchange.

Bases: Resource

Client to fetch CEX trading fee data from DataMaxi+ API.

Parameters:

  • api_key (str, default: None ) –

    The DataMaxi+ API key

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

    Keyword arguments used by datamaxi.api.API.

__call__

__call__(
    exchange: Optional[str] = None,
    symbol: Optional[str] = None,
) -> List[Dict]

Fetch trading fee data

GET /api/v1/cex/fees

https://docs.datamaxiplus.com/rest/cex/trading-fees/data

Parameters:

  • exchange (str, default: None ) –

    Exchange name

  • symbol (str, default: None ) –

    Symbol name

Returns:

  • List[Dict]

    Trading fee data

exchanges

exchanges() -> List[str]

Fetch supported exchanges for fee data.

GET /api/v1/cex/fees/exchanges

https://docs.datamaxiplus.com/rest/cex/trading-fees/exchanges

Returns:

  • List[str]

    List of supported exchanges

symbols

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

Fetch supported symbols for fee data.

GET /api/v1/cex/fees/symbols

https://docs.datamaxiplus.com/rest/cex/trading-fees/symbols

Parameters:

  • exchange (str) –

    Exchange name

Returns:

  • List[str]

    List of supported symbols