Sends a collection of orders (minimum of 2 and maximum 15):
Note: See the AssetPairs endpoint for details on the available trading pairs, their price and quantity precisions, order minimums, available leverage, etc.
API Key Permissions Required: Orders and trades - Create & modify orders and Orders and trades - Cancel & close orders
curl --request POST \
--url https://api.kraken.com/0/private/AddOrderBatch \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1695828490,
"orders": [
{
"close": {
"ordertype": "stop-loss-limit",
"price": "37000",
"price2": "36000"
},
"ordertype": "limit",
"price": "40000",
"price2": "string",
"timeinforce": "GTC",
"type": "buy",
"cl_ord_id": "6d1b345e-2821-40e2-ad83-4ecb18a06876",
"volume": "1.2"
},
{
"ordertype": "limit",
"price": "42000",
"starttm": "string",
"timeinforce": "GTC",
"type": "sell",
"cl_ord_id": "da8e4ad59b78481c93e589746b0cf91",
"volume": "1.2"
}
],
"pair": "BTC/USD",
"validate": false,
"deadline": "2023-09-24T14:15:22Z"
}
'{
"error": [],
"result": {
"orders": [
{
"txid": "O5OR23-ADFAD-Y2G61C",
"descr": {
"order": "buy 0.80300000 XBTUSD @ limit 28300.0",
"close": "close position @ stop loss 27000.0 -> limit 26000.0"
}
},
{
"txid": "9K6KFS-5H3PL-XBRC7A",
"descr": {
"order": "sell 0.10500000 XBTUSD @ limit 36000.0"
}
}
]
}
}Documentation Index
Fetch the complete documentation index at: https://kraken-sandbox.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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.
Nonce used in construction of API-Sign header
Show child attributes
Asset pair id or altname
This parameter is required on requests for non-crypto pairs, i.e. use tokenized_asset for xstocks.
tokenized_asset RFC3339 timestamp (e.g. 2021-04-01T00:18:45Z) after which the matching engine should reject the new order request, in presence of latency or order queueing. min now() + 2 seconds, max now() + 60 seconds.
Validate inputs only. Do not submit order.
curl --request POST \
--url https://api.kraken.com/0/private/AddOrderBatch \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1695828490,
"orders": [
{
"close": {
"ordertype": "stop-loss-limit",
"price": "37000",
"price2": "36000"
},
"ordertype": "limit",
"price": "40000",
"price2": "string",
"timeinforce": "GTC",
"type": "buy",
"cl_ord_id": "6d1b345e-2821-40e2-ad83-4ecb18a06876",
"volume": "1.2"
},
{
"ordertype": "limit",
"price": "42000",
"starttm": "string",
"timeinforce": "GTC",
"type": "sell",
"cl_ord_id": "da8e4ad59b78481c93e589746b0cf91",
"volume": "1.2"
}
],
"pair": "BTC/USD",
"validate": false,
"deadline": "2023-09-24T14:15:22Z"
}
'{
"error": [],
"result": {
"orders": [
{
"txid": "O5OR23-ADFAD-Y2G61C",
"descr": {
"order": "buy 0.80300000 XBTUSD @ limit 28300.0",
"close": "close position @ stop loss 27000.0 -> limit 26000.0"
}
},
{
"txid": "9K6KFS-5H3PL-XBRC7A",
"descr": {
"order": "sell 0.10500000 XBTUSD @ limit 36000.0"
}
}
]
}
}