---
title: "Get Balance"
method: GET
path: "/v1/perps/balance"
tags: ["Margin Account"]
---

# Get Balance

`GET /v1/perps/balance`

Get a summary of the balance for a margin account. For how positions and balances work, see [Positions and balances](/positions-balances).

## Response `200`

Margin account balance summary

- object
  - `success` boolean, required — Whether the request was successful
  - `error` string — Error message, present only on failure
  - `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
  - `result` MarginAccountBalanceSummary
    - `walletBalance` string, required — The amount in USDC resulting from transfers in/out, realized PnL, and fees. wallet_balance = deposits - withdrawals + realized_pnl + trading_fees + funding_rate_fees
    - `realizedPnl` string, required — Total realized PNL in USDC
    - `unrealizedPnl` string, required — The current unrealized PNL in USDC at mark price for open positions
    - `marginBalance` string, required — Margin balance in USDC. margin_balance = wallet_balance + unrealized_pnl
    - `usedMargin` string, required — Amount of used margin in USDC for resting orders and positions. used_margin = sum_for_all_markets(max(position_ask + resting_orders_ask, position_bid + resting_orders_bid) + open_loss_total)
    - `availableMargin` string, required — Amount of margin in USDC available for new positions. available_balance = margin_balance - used_margin. Will not be negative.
    - `withdrawableMargin` string, required — Amount in USDC available for withdrawal. withdrawable_amount = max(0, min(available_balance, wallet_balance))
    - `maintenanceMarginRequirement` string, required — Total maintenance margin requirement for all open positions
    - `totalMaintenanceMargin` string, required — Total maintenance margin requirement for all open positions and resting orders
    - `marginRatio` string, required — Margin ratio (0–100%) indicating liquidation proximity. margin_ratio = maintenance_margin / margin_balance. Returns 9999 if margin balance is negative or zero.
    - `leverage` string, required — Effective leverage for the entire account (notional value of all positions / margin balance)
    - `underLiquidation` boolean, required — Whether the account is currently under liquidation
    - `totalFundingPayments` string, required — Sum of all funding payments applied to this account
    - `totalTradingFees` string, required — Sum of all trading fees paid. A negative value implies a net rebate.
    - `totalPnL` string, required — All-time PnL including realized/unrealized PnL, fees, and funding payments
    - `netInvested` string — Net amount invested

## Other responses

- `401` — Authentication required. Provide a valid JWT or API key.
- `403` — Access denied. The authenticated account does not have permission.
- `429` — Rate limit exceeded. Slow down request frequency.
- `500` — Internal server error.

---

[API](https://skmtc.net/ondoperps/apis/ondo-perps-rest-api.md) · [All operations](https://skmtc.net/ondoperps/apis/ondo-perps-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ondoperps/ondo-perps-rest-api/revisions/39df6b2fa672/schema)
