Skip to main content

user.position_balance

CHANNEL 

wss://stream.crypto.com/exchange/v1/user

user.position_balancePrivate
Position and balance realtime updates. Subscribe with channels ["user.position_balance"].

Request

Body

required
    id integerrequired

    Request id

    method stringrequired

    Possible values: [subscribe]

    params objectrequired
    channels string[]required

    e.g. ["user.position_balance"]

    nonce integerrequired

    Current timestamp in milliseconds

WebSocket response
Schema
    id int64
    method string
    code int32
    result object
    subscription string
    channel string
    data object[]
  • Array [
  • balances object[]
    Collateral balances (slim: instrument_name, quantity).
  • Array [
  • instrument_name string

    Instrument name of the collateral e.g. USD

    quantity decimal

    Quantity of the collateral.

    update_timestamp_ms int64

    Update time (Unix timestamp). Optional.

  • ]
  • positions object[]
    Position-level data; core fields only.
  • Array [
  • account_id string

    Account ID.

    instrument_name string

    E.g. BTCUSD-PERP.

    type string

    E.g. PERPETUAL_SWAP.

    quantity decimal

    Position quantity.

    cost string

    Position cost or value in USD.

    open_position_pnl string

    Profit and loss for the open position.

    open_pos_cost string

    Open position cost.

    session_pnl string

    Profit and loss in the current trading session.

    update_timestamp_ms int64

    Updated time (Unix timestamp).

    isolation_id string

    Isolation ID of the isolated position.

    isolation_type WsIsolationType (string)

    Possible values: [ISOLATED_MARGIN]

    Isolation type

  • ]
  • isolated_positions object[]
    Isolated margin rows; each has isolation_id, leverage, isolation_type, balances, positions; no nested isolated_positions.
  • Array [
  • isolation_id string

    Isolation ID of isolated position.

    leverage string

    The maximum leverage of the isolated position.

    isolation_type WsIsolationType (string)

    Possible values: [ISOLATED_MARGIN]

    Isolation type

    balances object[]
  • Array [
  • instrument_name string

    Instrument name of the collateral e.g. USD

    quantity decimal

    Quantity of the collateral.

    update_timestamp_ms int64

    Update time (Unix timestamp). Optional.

  • ]
  • positions object[]
    Position-level data; core fields only (same as UserPositionItemBase).
  • Array [
  • account_id string

    Account ID.

    instrument_name string

    E.g. BTCUSD-PERP.

    type string

    E.g. PERPETUAL_SWAP.

    quantity decimal

    Position quantity.

    cost string

    Position cost or value in USD.

    open_position_pnl string

    Profit and loss for the open position.

    open_pos_cost string

    Open position cost.

    session_pnl string

    Profit and loss in the current trading session.

    update_timestamp_ms int64

    Updated time (Unix timestamp).

    isolation_id string

    Isolation ID of the isolated position.

    isolation_type WsIsolationType (string)

    Possible values: [ISOLATED_MARGIN]

    Isolation type

  • ]
  • ]
  • ]