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}]


Type Field

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

Field Name

Type

Description

Required

Default

type

String

Data type

  • myOrder: My Order

O

codes

List

Market code list. Must be in capital letters.

X

If omitted or empty, data for all markets will be received.


Response

❗️

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

It is normal if no data is received immediately after connection. Data will be sent for events such as order placement, execution, or cancellation. To maintain the connection, send ping/pong messages periodically.

Field NameSimplified FormatDescriptionTypeValue
typetyTypeStringmyOrder
codecdMarket code (e.g., SDG-BTC)String
uuiduidUnique Order IDString
ask_bidabAsk/BidStringASK, BID
order_typeotOrder methodStringlimit, price, market, best
statesOrder stateStringwait, watch, trade, done, cancel
trade_uuidtuidUnique transaction IDString
pricepOrder or trade priceDouble
avg_priceapAverage trade priceDouble
volumevOrder or trade volumeDouble
remaining_volumervRemaining volumeDouble
executed_volumeevExecuted volumeDouble
trades_counttcNumber of trades in the orderInteger
reserved_feersfReserved feeDouble
remaining_feermfRemaining feeDouble
paid_feepfPaid feeDouble
lockedlLocked fundsDouble
executed_fundsefExecuted fundsDouble
time_in_forcetifTime in forceStringioc, fok
trade_feetfTrade fee (nullable)Double
is_makerimMaker or taker (nullable)Booleantrue, false
identifieridCustom user value (only for orders after Oct 18, 2024)String
trade_timestampttmsTrade timestamp (ms)Long
order_timestampotmsOrder timestamp (ms)Long
timestamptmsEvent timestamp (ms)Long
stream_typestStream typeStringREALTIME

Example

Request

Example 1: All market data (no codes)

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

Example 2: All market data (empty codes)

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

Example 3: Specific market data

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

Response

{
  "type": "myOrder",
  "code": "SGD-XRP",
  "uuid": "ac2dc2a3-fce9-40a2-a4f6-5987c25c438f",
  "ask_bid": "BID",
  "order_type": "limit",
  "state": "trade",
  "trade_uuid": "61314169-fba4-4375-ade3-aff14a656647",
  "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",
  "trade_timestamp": 1710751590123,
  "order_timestamp": 1710751590000,
  "timestamp": 1710751597500,
  "stream_type": "REALTIME"
}