curl --request POST \
--url https://api.kraken.com/0/private/AddStrategy \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1781169958000,
"symbol": "BTC/USD",
"asset_class": "forex",
"strategy_type": "twap",
"side": "buy",
"volume": "1.5",
"ordertype": "limit",
"price": "67000.0",
"expiretm": "+3600"
}
'{
"error": [],
"result": {
"strategy_id": "ASMBA64-R23M2-J7JRJV"
}
}Algo Trading
Add Strategy
Create a new algorithmic strategy. The only supported strategy_type today is twap.
A TWAP executes the total volume evenly between starttm and expiretm, as market or limit child orders. The response returns the strategy_id. Use it with CancelStrategy and QueryStrategies.
Validation rules
- The resolved time horizon (
expiretm−starttm) must be at least 60 seconds. Bothstarttmandexpiretmmust be no more than 30 days from now. expiretmmust be in the future.priceis required whenordertypeislimit, and must be omitted whenordertypeismarket.symbol,volumeandpricefollow the same pair, precision and order minimum rules as Add Order.- xStocks pairs are not supported.
Set validate to true to validate the request without creating or submitting the strategy to the execution engine. The response returns an empty strategy_id. This does not run the creation-time balance check or guarantee that a subsequent creation request will succeed.
API Key Permissions Required: Orders and trades - Create & modify orders
POST
/
private
/
AddStrategy
curl --request POST \
--url https://api.kraken.com/0/private/AddStrategy \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1781169958000,
"symbol": "BTC/USD",
"asset_class": "forex",
"strategy_type": "twap",
"side": "buy",
"volume": "1.5",
"ordertype": "limit",
"price": "67000.0",
"expiretm": "+3600"
}
'{
"error": [],
"result": {
"strategy_id": "ASMBA64-R23M2-J7JRJV"
}
}Authorizations
Body
application/json
Was this page helpful?