private/bot/create-trading-bot (TWAP)
POSTCreates a new TWAP (Time-Weighted Average Price) Trading Bot that executes large orders by splitting them into smaller slices over a defined time window to minimise market impact./private/bot/create-trading-bot
Request
Body
required
- DCA: Dollar Cost Averaging
- TWAP: Time-Weighted Average Price
- GRID: Grid trading
- FUNDING_ARBITRAGE: Funding arbitrage
- Array [
- ]
- FIXED_DURATION: Fixed interval in milliseconds
- MONTHLY: Monthly investment
Request id (echoed in response)
Must be "private/bot/create-trading-bot"
Your API key (only required for private REST)
HMAC-SHA256 signature in hex (only required for private REST)
Current timestamp in milliseconds, e.g. "1610905028000".
params objectrequired
Possible values: [DCA, TWAP, GRID, FUNDING_ARBITRAGE]
Trading bot type:
Whether to receive push notifications on bot state changes
Display name of the trading bot. 4-15 characters; letters, numbers,
settings object required
Whether this is a basket DCA bot (multiple instruments)
allocations object[]required
Instrument name
Percentage allocated (must sum to 100 across all allocations)
Currency used for investment
Possible values: [BUY, SELL]
BUY or SELL. Required when is_basket is false
Possible values: [MARKET, LIMIT]
MARKET or LIMIT. Required when is_basket is false
Whether to automatically stake earned tokens. Required when is_basket is false
Limit price. Required when type is LIMIT
Quantity per order. Either quantity or total_investment is required
Total investment amount. Either quantity or total_investment is required
Possible values: [FIXED_DURATION, MONTHLY]
Investment frequency mode for DCA bots:
Interval between orders in milliseconds. Required when investment_frequency_mode is FIXED_DURATION
Unix timestamp in milliseconds for the first order
Total duration. In number of months when investment_frequency_mode is MONTHLY; in milliseconds when FIXED_DURATION.
Maximum number of orders to place
Stop-loss price. Not supported for basket bots
Take-profit price. Not supported for basket bots
Whether to use simplified mode
Schema
Original request identifier
Method name
0 for success; error code otherwise
Error message for non-zero codes
result object
Newly created Trading Bot ID