Account orders

Streams all changes made to an account's open orders in any market. An order that has been cancelled/filled will be streamed and return empty.

Refer to Websocket for establishing the websocket connection.

Params

{
    "method": "subscribe",
    "params": {
        "source": "account_orders",
        "account": "42trU9A5..."
    }
}

Orders Snapshots

Upon subscription, the account_orders websocket immediately returns a snapshot of all current orders, then begins streams all changes made to an account's orders in a best effort picture of current state. We recommend using account_orders for initialization, and account_order_updates to construct up-to-date local order state.

Stream

{
  "channel": "account_orders",
  "data": [
    {
      "i": 1879999120,
      "I": null,
      "s": "BTC",
      "d": "bid",
      "p": "80000",
      "a": "0.00025",
      "f": "0",
      "c": "0",
      "t": 1765935070713,
      "st": null,
      "ot": "limit",
      "sp": null,
      "ro": false
    }
  ],
  "li": 1880004176
} // this is the initialization snapshot with an existing order

{
  "channel": "account_orders",
  "data": [
    {
      "i": 1880009776,
      "I": null,
      "s": "BTC",
      "d": "bid",
      "p": "81000",
      "a": "0.00024",
      "f": "0",
      "c": "0",
      "t": 1765935092314,
      "st": null,
      "ot": "limit",
      "sp": null,
      "ro": false
    },
    {
      "i": 1879999120,
      "I": null,
      "s": "BTC",
      "d": "bid",
      "p": "80000",
      "a": "0.00025",
      "f": "0",
      "c": "0",
      "t": 1765935070713,
      "st": null,
      "ot": "limit",
      "sp": null,
      "ro": false
    }
  ],
  "li": 1880009851
} // this is an update after another order was placed
Field
Type
Description

'i'

integer

Order ID

'I'

Full UUID string

Client order ID

's'

string

Symbol

'd'

string

Side: [bid, ask]

'p'

decimal string

Average filled price

'a'

decimal string

Original amount

'f'

decimal string

Filled amount

'c'

decimal string

Cancelled amount

't'

integer

Timestamp (milliseconds)

'st'

string

Stop type (TP/SL)

'ot'

string

Order type [market, limit]

'sp'

string

Stop price

'ro'

bool

Reduce only

'li'

integer

Exchange-wide nonce. Used to reliably determine exchange event ordering. Sequential and not subject to clock drift.

Last updated