Skip to content

Funding Rate

Bases: API

Client to fetch funding rate 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,
    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 historical funding rate data

GET /api/v1/funding-rate

https://docs.datamaxiplus.com/rest/funding-rate/historical-funding-rate

Parameters:

  • exchange (str) –

    Exchange name

  • symbol (str) –

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

    Historical funding rate data in pandas DataFrame and next request function

getLatest

getLatest(
    sort: str = None,
    limit: int = None,
    symbol: str = None,
    exchange: str = None,
    pandas: bool = True,
) -> Union[
    Tuple[List, Callable], Tuple[pd.DataFrame, Callable]
]

Fetch latest funding rate data

GET /api/v1/funding-rate/latest

https://docs.datamaxiplus.com/rest/funding-rate/latest-funding-rate

Parameters:

  • sort (str, default: None ) –

    Sort data by asc or desc

  • limit (int, default: None ) –

    Limit number of data to return

  • symbol (str, default: None ) –

    Symbol name

  • exchange (str, default: None ) –

    exchange name

  • pandas (bool, default: True ) –

    Return data as pandas DataFrame

Returns:

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

    Latest funding rate data in pandas DataFrame

exchanges

exchanges() -> List[str]

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

GET /api/v1/funding-rate/exchanges

https://docs.datamaxiplus.com/rest/funding-rate/exchanges

Returns:

  • List[str]

    List of supported exchanges

symbols

symbols(exchange: str, market: str = 'spot') -> List[str]

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

GET /api/v1/funding-rate/symbols

https://docs.datamaxiplus.com/rest/funding-rate/symbols

Parameters:

  • exchange (str) –

    Exchange name

Returns:

  • List[str]

    List of supported symbols