MyOrder (& Trade info)

šŸ“˜

Endpoint for private type

For the newly added myOrder and myAsset types, requests must be made to wss://EXCHANGE-REGION-ENDPOINT-URL.com/websocket/v1/private. Please refer to the "General Information" for more details.

Request

The requests is consisted of JSON Object and the response is also JSON Object. Requests are divided into ticket field, type field, and format field, and multiple type fields can be specified in one request. Please refer to Request method and format for ticket field and format field.

šŸ“˜

Request format

[{Ticket Field},{Type Field},....,{Type Field},{Format Field}][{Ticket Field},{Type Field},....,{Type Field},{Format Field}]

Type Field

In this field, you have to list the market data you want to receive.

Field Name
Type
Description
Required
Default
typeStringdata type
-Ā myOrder: My Orders
O
codesListMarket code list
*Must be requested in capital letters.
XIf you omit it or request an empty array, you will receive data for all markets.

Response

šŸ“˜

  • A Self-Match Prevention order option field has been added. (Learn more)
    • smp_type : reduce, cancel_maker, cancel_taker
  • A new order state type, prevented has been added to the state field.
  • A new order condition, post_only has been introduced to the time_in_force field.
ā—ļø

For the myOrder type, data is only transmitted when specific events occur.

Therefore, it is normal behavior if no data is received just after the connection. Data will be transmitted when events such as order placement, execution, or cancellation occur.
If you want to maintain the connection regardless of whether you receive data, you can periodically send ping/pong messages to manage it.

Field Name

Simplified Format (format: SIMPLE)

Description

TypeValue
typetyTypeStringmyOrder
codecdMarket code (ex. SDG-BTC)String
uuiduidUnique Order IDString
ask_bidabAsk/BidStringASK
BID
order_typeotOrder methodStringlimit
price
market
best
statesOrder StateStringwait
watch
trade
done
cancel
prevented
trade_uuidtuidUnique ID of the transactionString
pricepOrder price,
Transaction price (when state: trade)
Double
avg_priceapAverage transaction priceDouble
volumevOrder volume,
Transaction volume (when state: trade)
Double
remaining_volumervThe amount remaining after the orderDouble
executed_volumeevThe amount of the orders madeDouble
trades_counttcThe number of transactions in the orderInteger
reserved_feersfReserved feesDouble
remaining_feermfRemaining feesDouble
paid_feepfUsed feesDouble
lockedlFund being used in transactionsDouble
executed_fundsefExecuted fundDouble
time_in_forcetifioc, fok settingsStringioc
fok
post_only
trade_feetfFee incurred upon the trade
(null if not trade type)
Double
is_makerimIndicates whether the order is a maker or taker for which a match has occurred
(null if not trade type)
Booleantrue: Maker order
false: Taker order
identifierid

User custom value for query

*Provided only for orders created after October 18, 2024

String
smp_typesmptSelf-Match Prevention Type
(prevents matching between a member's own maker and taker orders)
String

reduce: If a self-match is detected, reduce the order size by the amount (or quantity) that would be matched (cancel if the remaining amount becomes zero).

cancel_maker:
If a self-match is detected, cancel the maker order and the taker order proceeds as-is.

cancel_taker:
If a self-match is detected, cancel the taker order and the maker order proceeds as-is.

prevented_volumepvOrder quantity canceled due to Self-Match PreventionDouble
prevented_lockedpl(Buy) The amount canceled due to the Self-Match Prevention (SMP) setting.
(Sell) The volume canceled due to the Self-Match Prevention (SMP) setting.
Double
trade_timestampttmsTransaction timestamp (millisecond)Long
order_timestampotmsOrder timestamp (millisecond)Long
timestamptmstimestamp (millisecond)Long
stream_typestStream typeStringREALTIME

Example

Request

ex 1. To get all market information (not specify codes field)

[
  {
    "ticket": "test-myorder"
  },
  {
    "type": "myOrder"
  }
]

ex 2. To get all market information (empty array in codes)

[
  {
    "ticket": "test-myorder"
  },
  {
    "type": "myOrder",
    "codes": []
  }
]

ex 3. To get specific market information

[
  {
    "ticket": "test-myorder"
  },
  {
    "type": "myOrder",
    "codes": ["SGD-XRP"]
  }
]

ex 4. To get specific market information in a standard list format

[
  {
    "ticket": "test-myorder"
  },
  {
    "type": "myOrder",
    "codes": ["SGD-XRP"]
  },
  {
    "format": "JSON_LIST"
  }
]

Response

{
  "type": "myOrder",
  "code": "SGD-XRP",
  "uuid": "ac2dc2a3-fce9-40a2-a4f6-5987c25c438f",
  "ask_bid": "BID",
  "order_type": "limit",
  "state": "trade",
  "trade_uuid": "68315169-fba4-4175-ade3-aff14a616657",
  "price": 0.001453,
  "avg_price": 0.00145372,
  "volume": 30925891.29839369,
  "remaining_volume": 29968038.09235948,
  "executed_volume": 30925891.29839369,
  "trades_count": 1,
  "reserved_fee": 44.23943970238218,
  "remaining_fee": 21.77177967409916,
  "paid_fee": 22.467660028283017,
  "locked": 43565.33112787242,
  "executed_funds": 44935.32005656603,
  "time_in_force": null,
  "trade_fee": 22.467660028283017,
  "is_maker": true,
  "identifier": "test-1",
  "smp_type": "cancel_maker",
  "prevented_volume": 1.174291929,
  "prevented_locked": 0.001706246173,
  "trade_timestamp": 1710751590421,
  "order_timestamp": 1710751590000,
  "timestamp": 1710751597500,
  "stream_type": "REALTIME"
}
[
  {
    "type": "myOrder",
    "code": "SGD-XRP",
    "uuid": "ac2dc2a3-fce9-40a2-a4f6-5987c25c438f",
    "ask_bid": "BID",
    "order_type": "limit",
    "state": "trade",
    "trade_uuid": "68315169-fba4-4175-ade3-aff14a616657",
    "price": 0.001453,
    "avg_price": 0.00145372,
    "volume": 30925891.29839369,
    "remaining_volume": 29968038.09235948,
    "executed_volume": 30925891.29839369,
    "trades_count": 1,
    "reserved_fee": 44.23943970238218,
    "remaining_fee": 21.77177967409916,
    "paid_fee": 22.467660028283017,
    "locked": 43565.33112787242,
    "executed_funds": 44935.32005656603,
    "time_in_force": null,
    "trade_fee": 22.467660028283017,
    "is_maker": true,
    "identifier": "test-1",
    "smp_type": "cancel_maker",
    "prevented_volume": 1.174291929,
    "prevented_locked": 0.001706246173,
    "trade_timestamp": 1710751590421,
    "order_timestamp": 1710751590000,
    "timestamp": 1710751597500,
    "stream_type": "REALTIME"
  }
]