Skip to main content
POST
Create TWAP Order

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
market
string
required

Perps trading market

Example:

"AAPL-USD.P"

side
enum<string>
required

Order side

Available options:
buy,
sell
Example:

"buy"

size
string
required

Total order size in base currency to execute over the TWAP duration

Example:

"20.30"

runningTime
integer
required

Total duration of the TWAP order in seconds. Must be between 300 (5 minutes) and 86400 (24 hours) and a multiple of frequency.

Example:

3600

frequency
integer
required

Interval between child orders in seconds. runningTime / frequency gives the number of child orders, which must be between 2 and 200.

Example:

60

reduceOnly
boolean

If true, child orders are reduce-only

Example:

false

maxPrice
string

Maximum allowed price for child orders. Child orders will not be placed above this price.

Example:

"160.00"

minPrice
string

Minimum allowed price for child orders. Child orders will not be placed below this price.

Example:

"140.00"

Response

Created TWAP order

success
boolean
required

Whether the request was successful

Example:

true

error
string

Error message, present only on failure

Example:

""

error_code
string

Semantic error code. See each endpoint's error responses for the specific codes it can return.

deprecated
string

Deprecation notice, if applicable

Example:

""

result
object