PUBLISH Edit Order
Request
op
string
Yes
Operation code: edit_order
data.order_id
string
Yes
Order ID to be edited. Example: 0x4c43e0ab72a4edb72dfe4b129148899815d816837b9a7e22d964b884834639f8
data.instrument
string
Yes
Instrument ID number. Example: 12
data.maker
string
Yes
Account's Ethereum address.. Example: 0xYourAccountAddress
data.is_buy
boolean
Yes
True for long order, false for short order. Example: 12
data.amount
string
Yes
Number of contracts. In 6 decimals fixed number. Example: 1000000
data.limit_price
string
Yes
Order limit price. In 6 decimals fixed number. Example: 1000000
data.salt
string
Yes
A randomly generated number to guarantee transaction uniqueness. Example: 12345678
data.timestamp
string
No
Timestamp used in order signing in UNIX timestamp in seconds.. Example: 1680249600
data.signature
string
Yes
Hash of order payload signature signed by the account.
data.post_only
boolean
No
Flag to indicate that the order is a maker order, or is immediately rejected if it is a taker order.
data.time_in_force
string
No
Can be set to GTC or IOC (GTC is set by default)
data.mmp
boolean
No
Flag to include the order into MMP (false by default)
data.builder_id
string
No
Builder to attribute this order to. Requires builder_fee_rate, and the account must have approved the builder. See Builder Codes. Example: builder_0123456789abcdef
data.builder_fee_rate
string
No
Builder fee rate as a decimal fraction, at most 6 decimals (0.0003 = 3 bps). Must be at or below the user's approved maximum and the protocol cap. Include builderId and builderFeeRate in the order signature. Example: 0.0003
id
integer
No
Request ID, an arbitrary integer to link requests with responses. Example: 1
Example
{
"id": 1,
"op": "edit_order",
"data": {
"order_id": "0xa907d8c3037289f5b38c94760c06ae436566e600884d09cbeee2ef2c64b2695d",
"instrument": "11235",
"maker": "0xYourAccountAddress",
"is_buy": true,
"amount": "10000000",
"limit_price": "10000000",
"salt": "1",
"signature": "0x8aecd6e002780a08dc623233c4bf26f217d13483bf5d75dba49eb4eda865630631505f3dda0294c4f0b8d6b2357f2c2dc5d3c2106aed6e77e88785a6daf602701b"
}
}Response
data.order_id
string
Yes
Order ID is the hash of the order payload. Example: 0x4c43e0ab72a4edb72dfe4b129148899815d816837b9a7e22d964b884834639f8
data.account
string
Yes
Account's Ethereum address. Example: 0xYourAccountAddress
data.instrument_id
string
Yes
Instrument ID number. Example: 12
data.instrument_name
string
Yes
Instrument name. Example: ETH-24DEC22-1250-C
data.instrument_type
string
Yes
Type of instrument. Allowed values: OPTION PERPETUAL
data.expiry
string
No
Option expiry in UNIX timestamp in nanoseconds. Example: 1680249600000000000
data.strike
string
No
Option strike price. Example: 2500
data.option_type
string
No
Type of option contract. Allowed values: call put
data.order_type
string
Yes
Order type. Allowed values: limit market
data.order_status
string
Yes
Order status. Allowed values: opened cancelled partial filled
data.side
string
Yes
Trade side. Allowed values: buy sell
data.amount
string
Yes
Amount of contracts. Example: 12.23
data.price
string
Yes
Price in USD. Example: 12.23
data.filled
string
Yes
Amount filled. Example: 10.4
data.initial_margin
string
Yes
Margin required to keep an open order. Example: 12.23
data.avg_price
string
No
Average execution price in USD. Example: 12.23
data.created_timestamp
string
Yes
Created timestamp in UNIX timestamp in nanoseconds. Example: 1680249600000000000
data.timestamp
string
Yes
Response timestamp in UNIX timestamp in nanoseconds. Example: 1680249600000000000
data.system_type
string
Yes
System type where the order is created. Orders created via websocket will default to API.
id
integer
No
Response ID, an arbitrary integer to link requests with responses. Example: 1
Example
Last updated
Was this helpful?

