curl --request POST \
--url https://api.kraken.com/0/private/GetClosedStrategies \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1781169958000,
"strategy_type": "twap",
"status": "cancelled",
"start": 1781100000,
"end": 1781200000,
"query_time_mode": "close",
"limit": 50
}
'{
"error": [],
"result": {
"closed": [
{
"strategy_id": "ASPBVCI-6MKBA-QE4VF6",
"status": "cancelled",
"reason": "userRequested",
"details": {
"strategy_type": "twap",
"side": "buy",
"volume": "1.50000000",
"filled_volume": "0.80000000",
"avg_price": "67098.42",
"total_cost": "53678.74",
"total_fee": "85.89",
"starttm": "1781169958",
"expiretm": "1781173558",
"symbol": "BTC/USD",
"asset_class": "forex",
"ordertype": "market"
}
},
{
"strategy_id": "ASMBA64-R23M2-J7JRJV",
"status": "closed",
"details": {
"strategy_type": "twap",
"side": "sell",
"volume": "2.00000000",
"filled_volume": "2.00000000",
"avg_price": "67050.10",
"total_cost": "134100.20",
"total_fee": "214.56",
"starttm": "1781166400",
"expiretm": "1781170000",
"symbol": "BTC/USD",
"asset_class": "forex",
"ordertype": "limit",
"price": "67000.00"
}
}
],
"next_cursor": "Q0xPU0VEOjE3ODExNzAwMDA6QVNNQkE2NA"
}
}Get Closed Strategies
Retrieve strategies in a terminal state (closed, expired or cancelled) as an ordered array in result.closed. Strategies are returned newest first by closing time, or by opening time when query_time_mode is open.
This endpoint uses cursor-based pagination. Each page holds up to limit strategies (default and maximum 100). While more results are available, the response includes next_cursor. Send it as cursor to fetch the next page. next_cursor is absent on the last page. Offset paging (ofs) and a total count are not supported. The cursor stores a sort position, not the filters, so repeat the original filters (asset_class, strategy_type, status, start, end and query_time_mode) on every page.
API Key Permissions Required: Orders and trades - Query closed orders & trades. Results are limited to the key’s own account.
curl --request POST \
--url https://api.kraken.com/0/private/GetClosedStrategies \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1781169958000,
"strategy_type": "twap",
"status": "cancelled",
"start": 1781100000,
"end": 1781200000,
"query_time_mode": "close",
"limit": 50
}
'{
"error": [],
"result": {
"closed": [
{
"strategy_id": "ASPBVCI-6MKBA-QE4VF6",
"status": "cancelled",
"reason": "userRequested",
"details": {
"strategy_type": "twap",
"side": "buy",
"volume": "1.50000000",
"filled_volume": "0.80000000",
"avg_price": "67098.42",
"total_cost": "53678.74",
"total_fee": "85.89",
"starttm": "1781169958",
"expiretm": "1781173558",
"symbol": "BTC/USD",
"asset_class": "forex",
"ordertype": "market"
}
},
{
"strategy_id": "ASMBA64-R23M2-J7JRJV",
"status": "closed",
"details": {
"strategy_type": "twap",
"side": "sell",
"volume": "2.00000000",
"filled_volume": "2.00000000",
"avg_price": "67050.10",
"total_cost": "134100.20",
"total_fee": "214.56",
"starttm": "1781166400",
"expiretm": "1781170000",
"symbol": "BTC/USD",
"asset_class": "forex",
"ordertype": "limit",
"price": "67000.00"
}
}
],
"next_cursor": "Q0xPU0VEOjE3ODExNzAwMDA6QVNNQkE2NA"
}
}Authorizations
The "API-Key" header should contain your API key.
Authenticated requests should be signed with the "API-Sign" header, using a signature generated with your private key, nonce, encoded payload, and URI path.
Body
Nonce used in construction of API-Sign header
Restrict results to one asset class. Omit to return all asset classes. Repeat the same value on subsequent cursor pages.
forex, tokenized_asset, synthetic_pair Restrict results to one strategy type. Omit to return all types.
twap Restrict results to one terminal status. Omit to return all three.
closed, expired, cancelled Inclusive lower bound in Unix seconds, applied according to query_time_mode. Omit or use 0 for no lower bound.
Inclusive upper bound in Unix seconds, including the entire end second. Omit or use 0 for no upper bound.
Which timestamps the bounds apply to:
open: both bounds apply to the persisted opening time, not the scheduledstarttm.close: both bounds apply to the time the strategy reached a terminal state.both:startbounds the opening time andendbounds the closing time; both conditions must hold. Results are ordered newest first by opening time foropen, otherwise by closing time.
open, close, both Maximum number of strategies per page.
1 <= x <= 100Opaque pagination token from next_cursor of the previous page. Omit for the first page. The cursor stores a sort position, not the filters, so repeat the original asset_class, strategy_type, status, start, end and query_time_mode on every page.
Was this page helpful?