v1

latestOpenAPI 3.0.32026-07-267278168.1 KB
Margin Account

Get Balance

Get a summary of the balance for a margin account. For how positions and balances work, see Positions and balances.

get/v1/perps/balance

Response

Margin account balance summary

successboolean required

Whether the request was successful

errorstring

Error message, present only on failure

error_codestring

Semantic error code. See each endpoint's error responses for the specific codes it can return.

deprecatedstring

Deprecation notice, if applicable

Example response

{
  "success": true,
  "result": {
    "walletBalance": "2000",
    "realizedPnl": "600",
    "unrealizedPnl": "-500",
    "marginBalance": "1500",
    "usedMargin": "200",
    "availableMargin": "1300",
    "withdrawableMargin": "100",
    "maintenanceMarginRequirement": "150",
    "totalMaintenanceMargin": "200",
    "marginRatio": "0.13",
    "leverage": "5.0",
    "totalFundingPayments": "123",
    "totalTradingFees": "123",
    "totalPnL": "477",
    "netInvested": "1000"
  }
}