Skip to main content

private/get-subaccount-balances

POST 

/private/get-subaccount-balances

Returns the user's wallet balances of all sub-accounts.

Request

Body

required
    id int64required

    Request id (echoed in response)

    method stringrequired

    Must be "private/get-subaccount-balances"

    api_key stringrequired

    Your API key (only required for private REST)

    sig stringrequired

    HMAC-SHA256 signature in hex (only required for private REST)

    nonce int64required

    Current timestamp in milliseconds, e.g. "1771761038000".

    params objectrequired
    No parameters; use empty object
Success.
Schema
    id int64

    Echoed request id

    method string

    Method invoked

    code int32

    0 = success; non-zero indicates error (reason code).

    result object
    Present when code === 0.
    data object[]
    List of sub-account balances.
  • Array [
  • instrument_name string

    Instrument name of the balance e.g. USD

    total_available_balance decimal

    Balance that user can open new order (Margin Balance - Initial Margin)

    total_margin_balance decimal

    Positive cash balance on eligible collateral tokens + Negative balance on all tokens + Unrealised PnL - Fee reserves

    total_initial_margin decimal

    Total margin requirement to support positions and all open orders IM and haircut from risk asset holdings. Total sum of total_position_im + total_haircut.

    total_maintenance_margin decimal

    Total maintenance margin requirement for all positions

    total_position_cost decimal

    Position value in USD

    total_cash_balance decimal

    Wallet Balance (Deposits - Withdrawals + Realized PnL - Fees)

    total_collateral_value decimal

    Collateral Value

    total_session_unrealized_pnl decimal

    Current unrealized profit and loss from all open positions (calculated with Mark Price and Avg Price)

    total_session_realized_pnl decimal

    Current realized profit and loss from all open positions (calculated with Mark Price and Avg Price)

    is_liquidating boolean

    Describes whether the account is under liquidation

    total_effective_leverage decimal

    The actual leverage used (all open positions combined), i.e. position size / margin balance.

    position_limit decimal

    Maximum position size allowed (for all open positions combined)

    used_position_limit decimal

    Combined position size of all open positions + order exposure on all instruments

    total_isolated_cash_balance decimal

    Sum of cash balance of the isolated positions

    total_position_im decimal

    Optional; present in isolated position items.

    total_haircut decimal

    Optional; present in isolated position items.

    total_risk_exposure decimal

    Total risk exposure. Optional.

    total_borrow decimal

    Total borrow. Optional.

    margin_score decimal

    Margin score. Optional.

    has_risk boolean

    Whether the account has risk. Optional.

    terminatable boolean

    Whether the account is terminatable. Optional.

    credit_limits array

    Credit limits; may be empty. Item shape TBD when non-empty. Optional.

    position_balances object[]
    Collateral balances as shown below.
  • Array [
  • instrument_name string

    Instrument name of the collateral e.g. USD

    quantity decimal

    Quantity of the collateral

    market_value decimal

    Market value of the collateral

    collateral_eligible boolean

    true or false

    haircut decimal

    Show haircut for eligible collateral token

    collateral_amount decimal

    Collateral amount derived by market_value minus haircut

    max_withdrawal_balance decimal

    Max withdrawal balance of the collateral

    reserved_qty decimal

    Fund/balance in use, not available for new orders or additional trading activities.

    hourly_interest_rate decimal

    Hourly interest rate for the collateral; e.g. "0". Optional.

  • ]
  • isolated_positions object[]
    Balance of isolated positions (IsolatedPositionItem; own schema, no recursion). Optional; present in user-balance and get-subaccount-balances.
  • Array [
  • instrument_name string

    Instrument name of the balance e.g. USD

    total_available_balance decimal

    Balance that user can open new order (Margin Balance - Initial Margin)

    total_margin_balance decimal

    Positive cash balance on eligible collateral tokens + Negative balance on all tokens + Unrealised PnL - Fee reserves

    total_initial_margin decimal

    Total margin requirement to support positions and all open orders IM and haircut from risk asset holdings. Total sum of total_position_im + total_haircut.

    total_maintenance_margin decimal

    Total maintenance margin requirement for all positions

    total_position_cost decimal

    Position value in USD

    total_cash_balance decimal

    Wallet Balance (Deposits - Withdrawals + Realized PnL - Fees)

    total_collateral_value decimal

    Collateral Value

    total_session_unrealized_pnl decimal

    Current unrealized profit and loss from all open positions (calculated with Mark Price and Avg Price)

    total_session_realized_pnl decimal

    Current realized profit and loss from all open positions (calculated with Mark Price and Avg Price)

    is_liquidating boolean

    Describes whether the account is under liquidation

    total_effective_leverage decimal

    The actual leverage used (all open positions combined), i.e. position size / margin balance.

    position_limit decimal

    Maximum position size allowed (for all open positions combined)

    used_position_limit decimal

    Combined position size of all open positions + order exposure on all instruments

    total_isolated_cash_balance decimal

    Sum of cash balance of the isolated positions

    total_position_im decimal

    Optional; present in isolated position items.

    total_haircut decimal

    Optional; present in isolated position items.

    total_risk_exposure decimal

    Total risk exposure. Optional.

    total_borrow decimal

    Total borrow. Optional.

    margin_score decimal

    Margin score. Optional.

    has_risk boolean

    Whether the account has risk. Optional.

    terminatable boolean

    Whether the account is terminatable. Optional.

    credit_limits array

    Credit limits; may be empty. Item shape TBD when non-empty. Optional.

    position_balances object[]
    Collateral balances as shown below.
  • Array [
  • instrument_name string

    Instrument name of the collateral e.g. USD

    quantity decimal

    Quantity of the collateral

    market_value decimal

    Market value of the collateral

    collateral_eligible boolean

    true or false

    haircut decimal

    Show haircut for eligible collateral token

    collateral_amount decimal

    Collateral amount derived by market_value minus haircut

    max_withdrawal_balance decimal

    Max withdrawal balance of the collateral

    reserved_qty decimal

    Fund/balance in use, not available for new orders or additional trading activities.

    hourly_interest_rate decimal

    Hourly interest rate for the collateral; e.g. "0". Optional.

  • ]
  • isolation_id string

    Isolation ID of isolated position.

    leverage decimal

    The maximum leverage of the isolated position.

    isolation_type IsolationType (string)

    Possible values: [ISOLATED_MARGIN]

    Isolation type

  • ]
  • account string

    Optional; sub-account ID in get-subaccount-balances.

  • ]
  • message string

    Present when code !== 0.

    original string

    Present when code !== 0.