strategy_id. Kraken then places the individual child orders until the strategy completes, expires, or you cancel it.
In Kraken Pro, TWAP strategies appear under Bots. A strategy you create through the API is the same object you see there.
Strategies and orders
Strategies run on Kraken’s side, next to the matching engine. Your client doesn’t need to stay connected, schedule orders or react to fills while a strategy runs. You can disconnect and check on it later.
Child orders are regular exchange orders. They are matched by the same engine and charged the same trading fees as orders you place yourself, and they appear in
ClosedOrders and trade history.
A child order or fill can’t yet be linked back to its
strategy_id from ClosedOrders or trade history. To follow a strategy’s progress, use the strategy endpoints: they report the filled volume, average price, total cost and fees for the whole strategy.Available strategies
More strategy types will be added over time. Each new type gets its own guide here and uses the same endpoints, selected by
strategy_type.
Strategy lifecycle
Every strategy type goes through the same statuses.
A strategy can also carry a
reason that explains its current state:
Endpoints
All Algo Trading endpoints are private Spot REST endpoints. They use the same authentication as every other/0/private endpoint: API-Key and API-Sign headers, and a nonce in the body.
Quick start
1
Check your API key
Enable Create & modify orders, Cancel & close orders, Query open orders & trades and Query closed orders & trades on the key. See API key permissions.
2
Validate the request
Send
AddStrategy with validate: true. Kraken validates the request (pair, volume, price, time window, minimums) without creating or submitting anything. A successful response returns an empty strategy_id. This doesn’t run the creation-time balance check.3
Create the strategy
Send the same request without
validate. Store the returned strategy_id.4
Monitor it
Poll
QueryStrategies with your strategy_id, or GetOpenStrategies for all running strategies. Track status, filled_volume and avg_price.5
Cancel or review
Call
CancelStrategy to stop it early. After it ends, it is listed by GetClosedStrategies.Good to know
- Spot REST only. Algo Trading is available on the Spot REST API. WebSocket and FIX support isn’t available yet.
- Execution is managed by Kraken. How child orders are sized, timed and placed is managed by Kraken and may change as execution improves. The parameters you send, and the guarantees each strategy guide lists (such as the limit price of a limit TWAP), don’t change.
- Funds aren’t reserved upfront. Each child order is checked against your available balance when it’s placed, like any other order.
- Sub-accounts. A strategy belongs to the account that created it. Requests made for a selected sub-account only see that sub-account’s strategies.
- No amendments yet. To change a running strategy, cancel it and create a new one.
TWAP
How the TWAP strategy works, with parameters and examples
Add Strategy
Full API reference for creating strategies
Order lifecycle
How the child orders behave once they reach the book