Skip to content

Margin Borrow

Margin borrow data for a single asset.

Usage

Sync
from datamaxi import Datamaxi

maxi = Datamaxi(api_key="YOUR_API_KEY")

data = maxi.margin_borrow(asset="BTC")
Async
import asyncio
from datamaxi.aio import AsyncDatamaxi


async def main():
    async with AsyncDatamaxi(api_key="YOUR_API_KEY") as client:
        data = await client.margin_borrow(asset="BTC")


asyncio.run(main())

Bases: Resource

Client to fetch margin borrow 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__(asset: str) -> Dict[str, Any]

Fetch margin borrow data for a single asset.

GET /api/v1/margin-borrow

Parameters:

  • asset (str) –

    Token base asset (e.g. BTC).

Returns:

  • Dict[str, Any]

    Margin borrow response.