Authenticated channel for updates related to user activities (orders, trades), filtered for authenticated user by apikey.

SUBSCRIBE

<wss-channel> user

Trade Message

Emitted when:

  • when a market order is matched (“MATCHED”)
  • when a limit order for the user is included in a trade (“MATCHED”)
  • subsequent status changes for trade (“MINED”, “CONFIRMED”, “RETRYING”, “FAILED”)

Structure

NameTypeDescription
asset_idstringasset id (token ID) of order (market order)
event_typestring”trade”
idstringtrade id
last_updatestringtime of last update to trade
maker_ordersMakerOrder[]array of maker order details
marketstringmarket identifier (condition ID)
matchtimestringtime trade was matched
outcomestringoutcome
ownerstringapi key of event owner
pricestringprice
sidestringBUY/SELL
sizestringsize
statusstringtrade status
taker_order_idstringid of taker order
timestampstringtime of event
trade_ownerstringapi key of trade owner
typestring”TRADE”

Where a MakerOrder object is of the form:

NameTypeDescription
asset_idstringasset of the maker order
matched_amountstringamount of maker order matched in trade
order_idstringmaker order ID
outcomestringoutcome
ownerstringowner of maker order
pricestringprice of maker order
Response
{
  "asset_id": "52114319501245915516055106046884209969926127482827954674443846427813813222426",
  "event_type": "trade",
  "id": "28c4d2eb-bbea-40e7-a9f0-b2fdb56b2c2e",
  "last_update": "1672290701",
  "maker_orders": [
    {
      "asset_id": "52114319501245915516055106046884209969926127482827954674443846427813813222426",
      "matched_amount": "10",
      "order_id": "0xff354cd7ca7539dfa9c28d90943ab5779a4eac34b9b37a757d7b32bdfb11790b",
      "outcome": "YES",
      "owner": "9180014b-33c8-9240-a14b-bdca11c0a465",
      "price": "0.57"
    }
  ],
  "market": "0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
  "matchtime": "1672290701",
  "outcome": "YES",
  "owner": "9180014b-33c8-9240-a14b-bdca11c0a465",
  "price": "0.57",
  "side": "BUY",
  "size": "10",
  "status": "MATCHED",
  "taker_order_id": "0x06bc63e346ed4ceddce9efd6b3af37c8f8f440c92fe7da6b2d0f9e4ccbc50c42",
  "timestamp": "1672290701",
  "trade_owner": "9180014b-33c8-9240-a14b-bdca11c0a465",
  "type": "TRADE"
}

Order Message

Emitted when:

  • When an order is placed (PLACEMENT)
  • When an order is updated (some of it is matched) (UPDATE)
  • When an order is canceled (CANCELLATION)

Structure

NameTypeDescription
asset_idstringasset ID (token ID) of order
associate_tradesstring[]array of ids referencing trades that the order has been included in
event_typestring”order”
idstringorder id
marketstringcondition ID of market
order_ownerstringowner of order
original_sizestringoriginal order size
outcomestringoutcome
ownerstringowner of orders
pricestringprice of order
sidestringBUY/SELL
size_matchedstringsize of order that has been matched
timestampstringtime of event
typestringPLACEMENT/UPDATE/CANCELLATION
Response
{
  "asset_id": "52114319501245915516055106046884209969926127482827954674443846427813813222426",
  "associate_trades": null,
  "event_type": "order",
  "id": "0xff354cd7ca7539dfa9c28d90943ab5779a4eac34b9b37a757d7b32bdfb11790b",
  "market": "0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
  "order_owner": "9180014b-33c8-9240-a14b-bdca11c0a465",
  "original_size": "10",
  "outcome": "YES",
  "owner": "9180014b-33c8-9240-a14b-bdca11c0a465",
  "price": "0.57",
  "side": "SELL",
  "size_matched": "0",
  "timestamp": "1672290687",
  "type": "PLACEMENT"
}