PUB wss://test-api.synquote.com/ws
Modifies an open limit order.
The order will lose its queue position, and will be assigned a new order_id.
This is a combined cancel+add operation and no other matching engine action can be executed by any other market participants during this action.
The status and cancel_reason fields are outlined here
REQUEST
HEADER PARAMS
| msg_type string required Message type: add_order
|
| id number required The ID of the request. This is returned in the response header. |
| version integer required Version number: 1
|
| account_id string required Account address which is placing the order. |
| order_id string required The order that will be replaced by this modify request. |
| instrument_id string required The instrument to buy or sell. |
| size string required Size of position to trade in the underlying asset. |
| side string required Can be buy or sell.
|
| order_type string required Can be limit, market, take_profit, or stop.
|
| time_in_force string required Can be one of gtc (Good till cancelled), gte (Good till expiration), ioc (Immediate or cancel), or fok (Fill-or-Kill).
|
| execution_type string required Can be post_only or allow_cross. post_only is only supported for limit orders.
|
| signature string required Signed order fields which are submitted to smart contracts for processing. |
| client_order_id string ID assigned to the order by the client. This must be unique per-account. Will be set automatically to the exchange’s unique order_id if absent.
|
| limit_price string Limit price for the order. If this field is absent, null, or zero for take_profit and stop orders, the order will execute at market once the trigger_price is reached. This field must be absent, null or zero for market orders.
|
| expiration number Time that order will explicitly be canceled, in UNIX epoch seconds. For orders which do not have time-in-force gte, this field must be absent or explicitly set to null or zero.
|
| nonce string required Used to make orders with otherwise identical signed fields unique. See nonce section in glossary for specific requirements. |
reduce_only booleantrue if the modification will only occur if it reduces the size.
|
| trigger_price string The reference price at which the order will become active. Required for take_profit and stop orders. Ignored for other order types.
|
Example
[
{
"msg_type":"add_order",
"id": 1002,
"version": 1
},
{
"account_id":"0x9f58498b98348b9BFbE53F0E18AA818a4Be0aE49",
"instrument_id": "ETH-PERPETUAL",
"size": "1",
"size": "buy",
"order_type": "limit",
"time_in_force": "gtc",
"execution_type": "allow_cross",
"limit_price": "4000",
"expiration": 0,
"nonce": "7433990883764493008",
"signature": "0xf86ea8c7f9a8e93f91b292b1e6ff3e0bb9b12f3aeb9ed32f3450fbbf1a2a5d181b7aef913589aa45d6d0bdf5c3085f8a3103a1e2fa1572bf12a55a8d7408df631c",
"reduce_only": false
}
]RESPONSE
add_order_response
object
|
|||||||||||||||||||||||||||||||||||
cancel_order_response
object
|
Example
[
{
"msg_type":"add_order_response",
"id": 1002,
"version": 1
},
{
"add_order_response": {
"account_id": "0x9f58498b98348b9bfbe53f0e18aa818a4be0ae49",
"transaction_ts": "1714441870685341751",
"avg_execution_price": "3207.60",
"client_order_id": "8524676410238383080",
"execution_type": "allow_cross",
"expiration": "1723081870",
"fills": [
{
"transaction_ts": "1714441870686868798",
"fill_price": "3207.6",
"fill_size": "63.98",
"fill_total_fee": "1.25",
"is_maker": false,
"is_liquidation": false,
"trade_pnl": "20.01",
"market_seqno": 123458,
"trade_id": "11416748077714502636"
}
],
"initial_size": "63.98",
"instrument_id": "ETH-PERPETUAL",
"limit_price": "3208.87",
"status": "full_fill",
"nonce": "7433990883764493008",
"order_id": "8524676410238383080",
"order_type": "limit",
"remaining_size": "0",
"side": "buy",
"signature": "0x8fdfb5a6f2fc9d25ff844d3ff3de0cc1f226c55cb9c632ff65f5532d6d1ea79f1f35f8ed588dcc2229b12165a2ca986fcde25aedf415adae0586823131db39741b",
"time_in_force": "gtc",
"total_fill_size": "63.98",
"cancel_reason": "cancel_order",
"reduce_only": false,
"market_seqno": 123457,
"prev_order_type": "limit"
},
"cancel_order_response": {
"client_order_id": "15895759660216296259",
"order_id": "15895759660216296259",
"status": "canceled",
"market_seqno": 123456,
"transaction_ts": "1727155069335724372",
"size": "1"
}
}
]