Orders
Place TWAP orders
Creates a batch of TWAP sub-orders that execute at scheduled intervals. Each sub-order is individually signed and scheduled. All sub-orders must share the same market, side, price, and size, and must be ordered with strictly increasing nonces.
Schedule constraints (return 400 when violated): sched_ts intervals between consecutive sub-orders must be positive, equal across the batch, and divisible by 60 seconds; the first sched_ts must be at least 10 seconds in the future.
Requires authentication.
ApiKeyAuth ApiSignatureAuth ApiTimestampAuth
x-api-key <token>
API key for authentication
In: header
x-api-signature <token>
HMAC-SHA256 signature: base64(HMAC(timestamp + method + path + body, secret))
In: header
x-api-timestamp <token>
Unix timestamp in seconds
In: header
PlaceTWAPOrdersRequest creates a batch of TWAP sub-orders.
Maximum 100 sub-orders per batch.
TypeScript Definitions
Use the request body type in TypeScript.
Copy
cURL
JavaScript
Go
Python
Java
C#curl -X POST "https://api.obsdn.trade/orders/twap" \ -H "Content-Type: application/json" \ -d '{}'
200
{
"ords" : [
{
"oid" : "string" ,
"mkt_id" : "string" ,
"sd" : "ORDER_SIDE_UNSPECIFIED" ,
"ot" : "ORDER_TYPE_UNSPECIFIED" ,
"sz" : "string" ,
"px" : "string" ,
"sndr" : "string" ,
"nonce" : "string" ,
"stp" : "SELF_TRADE_PREVENTION_UNSPECIFIED" ,
"po" : true ,
"tif" : "TIME_IN_FORCE_UNSPECIFIED" ,
"ro" : true ,
"st" : "ORDER_STATUS_UNSPECIFIED" ,
"done_rsn" : "string" ,
"stop_px" : "string" ,
"stop_px_type" : "STOP_PRICE_TYPE_UNSPECIFIED" ,
"stop_t" : "STOP_TYPE_UNSPECIFIED" ,
"is_liq" : true ,
"is_adl" : true ,
"liq_fee_rt" : "string" ,
"is_force_closed" : true ,
"mkr_fee_rt" : "string" ,
"tkr_fee_rt" : "string" ,
"filled_sz" : "string" ,
"avg_px" : "string" ,
"tot_fees" : "string" ,
"crt_ts" : "string" ,
"upd_ts" : "string" ,
"cancel_req_ts" : "string" ,
"exp_ts" : "string" ,
"sched_ts" : "string" ,
"cl_oid" : "string" ,
"par_oid" : "string" ,
"cancel_req" : true
}
],
"rejected" : [
{
"nonce" : "string" ,
"rej_rsn" : "string"
}
]
}