Four different amounts
Margin is the collateral required to support a position; it is not the position’s full notional value. The API’s
held field reports explicit reservations, not the entire margin requirement.
Worked example
Suppose you deposit $1,000, open a position and pay a $2 trading fee. The position has $40 of unrealized profit and $3 of recognized funding owed.
Here, only $600 can be paid immediately because the remaining available value is not all accessible for payment. Closing or settling a position, completing a pending operation, or returning collateral from a venue can change that amount.
This example assumes the stated valuation and non-overlapping requirements. Actual risk checks may value collateral or unrealized gains more conservatively. Dollar amounts are illustrative; the API uses exact quote-asset atoms.
Funding and margin
Funding is a payment associated with holding a perpetual position. A positive recognized payment adds to your account value; a negative payment reduces it. While it is unsettled, the API records it separately fromcash.
In the example above, settling the $3 payment changes `cash` from $998 to $995 and unsettled `funding` from −$3 to $0. Accounting equity remains $1,035 if the position value is unchanged. Settlement moves an already recorded amount; it does not charge the payment twice.
Initial margin is the collateral requirement for the position under your selected leverage. Maintenance margin is the minimum needed to support it under the risk policy. Pending orders and withdrawals can require additional reserved funds.
The API also reports risk equity, the value used for margin checks. Unlike accounting equity, it does not count positive unsettled funding as available backing. Neither figure is a promise of immediate withdrawal liquidity.