User Channels

Order Update

Subscribe

Message will be sent once your order in this market has an update (new/cancel/match/confirm).

circle-exclamation
Field
Value
Description

channel

trade.order.update

Channel of user order update

marketId

{MARKET_ID}

MarketId of subscribed binary market

rootMarketId

{ROOT_MARKET_ID}

MarketId of subscribed categorical market

Example
For Binary market:
{"action":"SUBSCRIBE","channel":"trade.order.update","marketId":1274}
For Categorical market:
{"action":"SUBSCRIBE","channel":"trade.order.update","rootMarketId":61}

Structure

Name
Type
Description

orderUpdateType

string

orderNew | orderFill | orderCancel | orderConfirm

marketId

number

market id

rootMarketId

number

root market id if belongs to a categorical market

orderId

string

order id

side

number

1 - buy, 2 - sell

outcomeSide

number

1 - yes, 2 - no

price

string

price

shares

string

amount of conditional token (e.g. "Yes","No")

amount

string

amount of quote token

status

number

1 - pending, 2 - finished, 3 - canceled, 4 - expired, 5 - failed

tradingMethod

number

1 - market order, 2 - limit order

quoteToken

string

contract address of quote token

createdAt

number

create unix timestamp

expiresAt

number

expire unix timestamp

chainId

string

chain id

filledShares

string

filled in shares, update after order confirmed on chain

filledAmount

string

filled in amount, update after order confirmed on chain

Trade Executed

Subscribe

Message will be sent once your trade (matched order) has been confirmed on-chain, or a split/merge has been executed on-chain. Same order can have multiple fills that ends up multiple trades.

Field
Value
Description

channel

trade.record.new

Channel of user trade notice

marketId

{MARKET_ID}

MarketId of subscribed binary market

rootMarketId

{ROOT_MARKET_ID}

MarketId of subscribed categorical market

Structure

Name
Type
Description

orderId

string

order id, same order can have multiple fills that ends up multiple trades

txHash

string

transaction hash on-chain, each trade has a unique txHash

marketId

number

market id

rootMarketId

number

root market id if belongs to a categorical market

side

string

Buy | Sell | Split | Merge

outcomeSide

number

1 - yes, 2 - no

price

string

price

shares

string

amount of conditional token (e.g. "Yes","No")

amount

string

amount of quote token

profit

string

realized profit in usd value, applicable for sell/merge

status

number

2 - finished, 3 - canceled, 5 - failed, 6 - onchain failed

quoteToken

string

contract address of quote token

quoteTokenUsdPrice

string

USD price of quote token at the moment

usdAmount

string

order value in USD value

fee

string

fee applied to this trade

chainId

string

chain id

createdAt

number

create unix timestamp

tradeNo

string

trade id for reference

Last updated