Skip to main content
GET
/
v1
/
perps
/
balance
Get Balance
curl --request GET \
  --url https://api.ondoperps.xyz/v1/perps/balance \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "result": {
    "walletBalance": "5000.00",
    "realizedPnl": "250.00",
    "unrealizedPnl": "-50.00",
    "marginBalance": "4950.00",
    "usedMargin": "1125.00",
    "availableMargin": "3825.00",
    "withdrawableMargin": "3825.00",
    "maintenanceMarginRequirement": "112.50",
    "totalMaintenanceMargin": "200.00",
    "marginRatio": "0.04",
    "leverage": "0.46",
    "underLiquidation": false,
    "totalFundingPayments": "-5.67",
    "totalTradingFees": "12.34",
    "totalPnL": "232.00",
    "netInvested": "4750.00"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Margin account balance summary

success
boolean
required

Whether the request was successful

Example:

true

error
string

Error message, present only on failure

Example:

""

error_code
string

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

deprecated
string

Deprecation notice, if applicable

Example:

""

result
object