Algos
Create algo order
Create a new algo order
TWAP
TWAP orders break a large trade into smaller ones over time to reduce market impact:
- Sub-orders are placed every 30 seconds.
- Order duration is between 30 and 86,400 seconds, in multiples of 30.
- Supported sub order type: MARKET
post/algo/orders
Request body
Example request
{
"algo_type": "TWAP",
"duration_seconds": 3600,
"market": "BTC-USD-PERP",
"on_behalf_of_account": "0x1234567890abcdef",
"size": "1.213"
}Response
Created
Example response
{
"account": "0x4638e3041366aa71720be63e32e53e1223316c7f0d56f7aa617542ed1e7512",
"avg_fill_price": "26000",
"cancel_reason": "NOT_ENOUGH_MARGIN",
"created_at": 1681493746016,
"end_at": 1681493746016,
"id": "123456",
"last_updated_at": 1681493746016,
"market": "BTC-USD-PERP",
"remaining_size": "0",
"size": "0.05"
}