Skip to main content

Twap

TWAP order β€” slices a large order into smaller child orders spread across a time window

orderType stringrequired

TWAP order β€” slices a large order into smaller child orders spread across a time window

Possible values: []

symbolstringrequired

Trading pair, e.g. BTC-USDT

orderSidestringrequired

BUY or SELL

Possible values: [BUY, SELL]

orderSizedoublerequired

Total order quantity in base currency

timePeriodint64required

Total execution window in seconds

clOrderIdstring

Client-supplied order identifier, echoed in the response (max 64 characters)

makerFirstboolean

If true, place child orders as post-only first before falling back to taker

randomizeSizeboolean

If true, randomize child order sizes to reduce predictability

subTwapMaxOrderSizedouble

Maximum size of each child order, in base currency

maxSpreaddouble

Pause execution while the bid-ask spread exceeds this value

maxDistanceThroughBookdouble

0 to 1; omit or set negative to disable, defaults to -1 (disabled)

Default value: -1
pausePricedouble

Pause execution when the reference price crosses this level

activationTriggerPricedouble

Delay execution until the market price reaches this level

activationTriggerPriceTypestring

Reference price for the activation trigger (LAST_PRICE, MARK_PRICE, or INDEX_PRICE)

Possible values: [INDEX_PRICE, LAST_PRICE, MARK_PRICE]

Twap
{
"orderType": "LIMIT",
"symbol": "string",
"orderSide": "BUY",
"orderSize": 0,
"timePeriod": 0,
"clOrderId": "string",
"makerFirst": true,
"randomizeSize": true,
"subTwapMaxOrderSize": 0,
"maxSpread": 0,
"maxDistanceThroughBook": -1,
"pausePrice": 0,
"activationTriggerPrice": 0,
"activationTriggerPriceType": "INDEX_PRICE"
}