This endpoint allows sending limit or stop order(s) and/or cancelling open order(s) and/or editing open order(s) for a currently listed Futures contract in batch.
When editing an order, if the trailingStopMaxDeviation and trailingStopDeviationUnit
parameters are sent unchanged, the system will recalculate a new stop price upon successful
order modification.
curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/batchorder \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'json={
"batchOrder": [
{
"order": "send",
"order_tag": "1",
"orderType": "lmt",
"symbol": "PF_XBTUSD",
"side": "buy",
"size": 1,
"limitPrice": 1,
"cliOrdId": "my_another_client_id"
}
]
}' \
--data ProcessBefore=2023-11-08T19:56:35.441899Z{
"result": "success",
"batchStatus": [
{
"status": "placed",
"order_tag": "1",
"order_id": "022774bc-2c4a-4f26-9317-436c8d85746d",
"dateTimeReceived": "2019-09-05T16:41:35.173Z",
"orderEvents": [
{
"type": "PLACE",
"order": {
"orderId": "022774bc-2c4a-4f26-9317-436c8d85746d",
"type": "lmt",
"symbol": "PF_XBTUSD",
"side": "buy",
"quantity": 1000,
"filled": 0,
"limitPrice": 9400,
"reduceOnly": false,
"timestamp": "2019-09-05T16:41:35.173Z",
"lastUpdateTimestamp": "2019-09-05T16:41:35.173Z"
}
}
]
},
{
"status": "edited",
"order_id": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"orderEvents": [
{
"type": "EDIT",
"old": {
"orderId": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"type": "lmt",
"symbol": "PF_XBTUSD",
"side": "buy",
"quantity": 102,
"filled": 0,
"limitPrice": 8500,
"reduceOnly": false,
"timestamp": "2019-09-04T11:45:48.884Z",
"lastUpdateTimestamp": "2019-09-04T11:45:48.884Z"
},
"new": {
"orderId": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"type": "lmt",
"symbol": "PF_XBTUSD",
"side": "buy",
"quantity": 1000,
"filled": 0,
"limitPrice": 9400,
"reduceOnly": false,
"timestamp": "2019-09-04T11:45:48.884Z",
"lastUpdateTimestamp": "2019-09-05T16:41:40.996Z"
}
}
]
},
{
"status": "cancelled",
"order_id": "566942c8-a3b5-4184-a451-622b09493129",
"orderEvents": [
{
"type": "CANCEL",
"uid": "566942c8-a3b5-4184-a451-622b09493129",
"order": {
"orderId": "566942c8-a3b5-4184-a451-622b09493129",
"type": "lmt",
"symbol": "PF_XBTUSD",
"side": "buy",
"quantity": 100,
"filled": 0,
"limitPrice": 8500,
"reduceOnly": false,
"timestamp": "2019-09-02T12:54:08.005Z",
"lastUpdateTimestamp": "2019-09-02T12:54:08.005Z"
}
}
]
}
],
"serverTime": "2019-09-05T16:41:40.996Z"
}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.
General API key with full access
Authentication string
This parameter is required to be encoded as a JSON string.
Show child attributes
{
"batchOrder": [
{
"order": "send",
"order_tag": "1",
"orderType": "lmt",
"symbol": "PF_XBTUSD",
"side": "buy",
"size": 1,
"limitPrice": 1,
"cliOrdId": "my_another_client_id"
},
{
"order": "send",
"order_tag": "2",
"orderType": "stp",
"symbol": "PF_XBTUSD",
"side": "buy",
"size": 1,
"limitPrice": 2,
"stopPrice": 3
},
{
"order": "cancel",
"order_id": "e35d61dd-8a30-4d5f-a574-b5593ef0c050"
},
{
"order": "cancel",
"cliOrdId": "my_client_id"
}
]
}The time before which the request should be processed, otherwise it is rejected.
"2023-11-08T19:56:35.441899Z"
A structure containing information on the send order request.
Show child attributes
success "success"
Server time in Coordinated Universal Time (UTC)
"2020-08-27T17:03:33.196Z"
curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/batchorder \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'json={
"batchOrder": [
{
"order": "send",
"order_tag": "1",
"orderType": "lmt",
"symbol": "PF_XBTUSD",
"side": "buy",
"size": 1,
"limitPrice": 1,
"cliOrdId": "my_another_client_id"
}
]
}' \
--data ProcessBefore=2023-11-08T19:56:35.441899Z{
"result": "success",
"batchStatus": [
{
"status": "placed",
"order_tag": "1",
"order_id": "022774bc-2c4a-4f26-9317-436c8d85746d",
"dateTimeReceived": "2019-09-05T16:41:35.173Z",
"orderEvents": [
{
"type": "PLACE",
"order": {
"orderId": "022774bc-2c4a-4f26-9317-436c8d85746d",
"type": "lmt",
"symbol": "PF_XBTUSD",
"side": "buy",
"quantity": 1000,
"filled": 0,
"limitPrice": 9400,
"reduceOnly": false,
"timestamp": "2019-09-05T16:41:35.173Z",
"lastUpdateTimestamp": "2019-09-05T16:41:35.173Z"
}
}
]
},
{
"status": "edited",
"order_id": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"orderEvents": [
{
"type": "EDIT",
"old": {
"orderId": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"type": "lmt",
"symbol": "PF_XBTUSD",
"side": "buy",
"quantity": 102,
"filled": 0,
"limitPrice": 8500,
"reduceOnly": false,
"timestamp": "2019-09-04T11:45:48.884Z",
"lastUpdateTimestamp": "2019-09-04T11:45:48.884Z"
},
"new": {
"orderId": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"type": "lmt",
"symbol": "PF_XBTUSD",
"side": "buy",
"quantity": 1000,
"filled": 0,
"limitPrice": 9400,
"reduceOnly": false,
"timestamp": "2019-09-04T11:45:48.884Z",
"lastUpdateTimestamp": "2019-09-05T16:41:40.996Z"
}
}
]
},
{
"status": "cancelled",
"order_id": "566942c8-a3b5-4184-a451-622b09493129",
"orderEvents": [
{
"type": "CANCEL",
"uid": "566942c8-a3b5-4184-a451-622b09493129",
"order": {
"orderId": "566942c8-a3b5-4184-a451-622b09493129",
"type": "lmt",
"symbol": "PF_XBTUSD",
"side": "buy",
"quantity": 100,
"filled": 0,
"limitPrice": 8500,
"reduceOnly": false,
"timestamp": "2019-09-02T12:54:08.005Z",
"lastUpdateTimestamp": "2019-09-02T12:54:08.005Z"
}
}
]
}
],
"serverTime": "2019-09-05T16:41:40.996Z"
}