Websocket
User Channel
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
Name | Type | Description |
---|---|---|
asset_id | string | asset id (token ID) of order (market order) |
event_type | string | ”trade” |
id | string | trade id |
last_update | string | time of last update to trade |
maker_orders | MakerOrder[] | array of maker order details |
market | string | market identifier (condition ID) |
matchtime | string | time trade was matched |
outcome | string | outcome |
owner | string | api key of event owner |
price | string | price |
side | string | BUY/SELL |
size | string | size |
status | string | trade status |
taker_order_id | string | id of taker order |
timestamp | string | time of event |
trade_owner | string | api key of trade owner |
type | string | ”TRADE” |
Where a MakerOrder
object is of the form:
Name | Type | Description |
---|---|---|
asset_id | string | asset of the maker order |
matched_amount | string | amount of maker order matched in trade |
order_id | string | maker order ID |
outcome | string | outcome |
owner | string | owner of maker order |
price | string | price of maker order |
Response
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
Name | Type | Description |
---|---|---|
asset_id | string | asset ID (token ID) of order |
associate_trades | string[] | array of ids referencing trades that the order has been included in |
event_type | string | ”order” |
id | string | order id |
market | string | condition ID of market |
order_owner | string | owner of order |
original_size | string | original order size |
outcome | string | outcome |
owner | string | owner of orders |
price | string | price of order |
side | string | BUY/SELL |
size_matched | string | size of order that has been matched |
timestamp | string | time of event |
type | string | PLACEMENT/UPDATE/CANCELLATION |
Response