Skip to main content
POST
/
batchorder
Batch order management
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.

Authorizations

APIKey
string
header
required

General API key with full access

Authent
string
header
required

Authentication string

Body

application/x-www-form-urlencoded
json
Batch Order · object
required

This parameter is required to be encoded as a JSON string.

Example:
{
"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"
}
]
}
ProcessBefore
any

The time before which the request should be processed, otherwise it is rejected.

Example:

"2023-11-08T19:56:35.441899Z"

Response

200 - application/json
batchStatus
BatchInstructionResult · object[]
required

A structure containing information on the send order request.

result
enum<string>
required
Available options:
success
Example:

"success"

serverTime
string<date-time>
required

Server time in Coordinated Universal Time (UTC)

Example:

"2020-08-27T17:03:33.196Z"