Skip to main content

user.positions

CHANNEL 

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

user.positionsPrivate
Position updates. Subscribe with channels ["user.positions"].

Request

Body

required
    id integerrequired

    Request id

    method stringrequired

    Possible values: [subscribe]

    params objectrequired
    channels string[]required

    e.g. ["user.positions"]

    nonce integerrequired

    Current timestamp in milliseconds

WebSocket response
Schema
    id int64
    method string
    code int32
    result object
    subscription string
    channel string
    data object[]
  • 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

    Last time the risk engine recalculated the owning margin unit; may look stale between trades.

    session_unrealized_pnl string

    Session unrealized PnL.

    pos_initial_margin string

    Position initial margin.

    pos_maintenance_margin string

    Derived as pos_initial_margin × MM ratio; not reported directly by the risk engine.

    market_value string

    Market value.

    mark_price decimal

    Mark price.

    target_leverage decimal

    Target leverage.

    liquidation_price decimal

    Liquidation price.

    effective_leverage decimal

    Effective leverage; present in user.account_risk and some WS responses. Optional.

  • ]