Skip to main content

user.order

CHANNEL 

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

user.orderPrivate
Order updates for the user. Subscribe with channel ["user.order"]. Initial response with same id contains current open orders; subsequent messages (id -1) are live updates.

Request

Body

required
    id integerrequired

    Request id

    method stringrequired

    Possible values: [subscribe]

    params objectrequired
    channels string[]required

    e.g. ["user.order"]

    nonce integerrequired

    Current timestamp in milliseconds

WebSocket response
Schema
    id int64
    method string
    code int32
    result object
    instrument_name string
    subscription string
    channel string
    data object[]
  • Array [
  • account_id string

    Account ID.

    order_id int64

    Order ID.

    client_oid string

    Client Order ID.

    order_type WsOrderType (string)

    Possible values: [LIMIT, MARKET, STOP_LOSS, STOP_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT]

    Order type:

    • ➖ LIMIT, MARKET
    • ➖ STOP_LOSS, STOP_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT: Trigger orders
    time_in_force WsTimeInForce (string)

    Possible values: [GOOD_TILL_CANCEL, IMMEDIATE_OR_CANCEL, FILL_OR_KILL]

    Time in force

    side WsOrderSide (string)

    Possible values: [BUY, SELL]

    BUY or SELL

    exec_inst WsExecInstOrderDetail (string)[]

    Possible values: [POST_ONLY, REDUCE_ONLY, SMART_POST_ONLY, LIQUIDATION, ISOLATED_MARGIN, MARGIN_ORDER]

    Execution instructions.

    quantity decimal

    Quantity specified in the order.

    limit_price decimal

    Limit price specified in the order.

    order_value decimal

    Order value.

    maker_fee_rate decimal

    User's maker fee rate.

    taker_fee_rate decimal

    User's taker fee rate.

    avg_price decimal

    Average price.

    cumulative_quantity decimal

    Cumulative executed quantity.

    cumulative_value decimal

    Cumulative executed value.

    cumulative_fee decimal

    Cumulative executed fee.

    status WsOrderStatus (string)

    Possible values: [PENDING, NEW, ACTIVE, FILLED, CANCELED, REJECTED, EXPIRED]

    Order status

    update_user_id string

    Updated user.

    order_date string

    Order creation date.

    instrument_name string

    E.g. BTCUSD-PERP.

    fee_instrument_name string

    Currency used for the fees.

    create_time int64

    Order creation timestamp (ms), e.g. "1771761038000".

    create_time_ns int64

    Order creation timestamp (nanosecond), e.g. "1771761038000000000".

    update_time int64

    Order update timestamp (ms), e.g. "1771761038000".

    reason string

    Rejection reason code; present for get-order-detail and get-order-history.

    isolation_id string

    isolation_id of the isolated position the order is tied to (derivatives only).

    isolation_type string

    Possible values: [ISOLATED_MARGIN]

    ISOLATED_MARGIN when isolation_id > 0 (derivatives only).

    list_id int64

    OTO/OTOCO/OCO list id; advanced only.

    contingency_type WsContingencyType (string)

    Possible values: [OCO, OTO, OTOCO, SPOT_ATTACH, DERIV_ATTACH]

    Contingency type for advanced orders:

    • ➖ OCO: One-Cancels-the-Other
    • ➖ OTO: One-Triggers-the-Other
    • ➖ OTOCO: One-Triggers-a-One-Cancels-the-Other
    • ➖ SPOT_ATTACH: SpotAttach (TP/SL attached to order for spot instruments)
    • ➖ DERIV_ATTACH: DerivAttach (TP/SL attached to order or position for derivative instruments)
    leg_id string

    Leg id within OTO/OTOCO/OCO; advanced only.

    ref_price decimal

    Trigger reference price (trigger legs only).

    ref_price_type string

    Possible values: [MARK_PRICE, INDEX_PRICE, LAST_PRICE]

    Price source used for ref_price: MARK_PRICE, INDEX_PRICE, or LAST_PRICE (trigger legs only).

    attach_order_id int64

    The order ID this trigger is attached to (for SpotAttach / DerivAttach attach-to-order orders).

    attach_isolation_id string

    Position this trigger is attached to (DerivAttach attach-to-position): > 0 = isolation_id of the isolated position; 0 = cross-margin position.

    exchange_order_id string

    Order ID assigned by the exchange (present once the leg has been accepted).

    reject_reason string

    Rejection reason, if the leg was rejected.

    leverage number

    Leverage specified on the primary leg (derivatives only, when provided).

    isolated_margin_amount decimal

    Isolated margin amount specified on the primary leg (derivatives only, when provided).

  • ]