Skip to main content
POST
/
private
/
QueryOrders
Query Orders Info
curl --request POST \
  --url https://api.kraken.com/0/private/QueryOrders \
  --header 'API-Key: <api-key>' \
  --header 'API-Sign: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "nonce": 1695828490,
  "trades": false,
  "userref": 1693455284,
  "txid": "STMH53C-C54CG-4SO42I, ST4USDQ-ZQBMB-FGET2G"
}
'
import requests

url = "https://api.kraken.com/0/private/QueryOrders"

payload = {
    "nonce": 1695828490,
    "trades": False,
    "userref": 1693455284,
    "txid": "STMH53C-C54CG-4SO42I, ST4USDQ-ZQBMB-FGET2G"
}
headers = {
    "API-Key": "<api-key>",
    "API-Sign": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {
    'API-Key': '<api-key>',
    'API-Sign': '<api-key>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    nonce: 1695828490,
    trades: false,
    userref: 1693455284,
    txid: 'STMH53C-C54CG-4SO42I, ST4USDQ-ZQBMB-FGET2G'
  })
};

fetch('https://api.kraken.com/0/private/QueryOrders', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.kraken.com/0/private/QueryOrders"

	payload := strings.NewReader("{\n  \"nonce\": 1695828490,\n  \"trades\": false,\n  \"userref\": 1693455284,\n  \"txid\": \"STMH53C-C54CG-4SO42I, ST4USDQ-ZQBMB-FGET2G\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("API-Key", "<api-key>")
	req.Header.Add("API-Sign", "<api-key>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
{
  "error": [],
  "result": {
    "OBCMZD-JIEE7-77TH3F": {
      "refid": "None",
      "userref": 0,
      "status": "closed",
      "reason": null,
      "opentm": 1688665496.7808,
      "closetm": 1688665499.1922,
      "starttm": 0,
      "expiretm": 0,
      "descr": {
        "pair": "XBTUSD",
        "type": "buy",
        "ordertype": "stop-loss-limit",
        "price": "27500.0",
        "price2": "0",
        "leverage": "none",
        "order": "buy 1.25000000 XBTUSD @ limit 27500.0",
        "close": ""
      },
      "vol": "1.25000000",
      "vol_exec": "1.25000000",
      "cost": "27526.2",
      "fee": "26.2",
      "price": "27500.0",
      "stopprice": "0.00000",
      "limitprice": "0.00000",
      "misc": "",
      "oflags": "fciq",
      "trigger": "index",
      "trades": [
        "TZX2WP-XSEOP-FP7WYR"
      ]
    },
    "OMMDB2-FSB6Z-7W3HPO": {
      "refid": "None",
      "userref": 0,
      "status": "closed",
      "reason": null,
      "opentm": 1688592012.2317,
      "closetm": 1688592012.2335,
      "starttm": 0,
      "expiretm": 0,
      "descr": {
        "pair": "XBTUSD",
        "type": "sell",
        "ordertype": "market",
        "price": "0",
        "price2": "0",
        "leverage": "none",
        "order": "sell 0.25000000 XBTUSD @ market",
        "close": ""
      },
      "vol": "0.25000000",
      "vol_exec": "0.25000000",
      "cost": "7500.0",
      "fee": "7.5",
      "price": "30000.0",
      "stopprice": "0.00000",
      "limitprice": "0.00000",
      "misc": "",
      "oflags": "fcib",
      "trades": [
        "TJUW2K-FLX2N-AR2FLU"
      ]
    }
  }
}

Authorizations

API-Key
string
header
required

The "API-Key" header should contain your API key.

API-Sign
string
header
required

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

application/json
nonce
integer<int64>
required

Nonce used in construction of API-Sign header

txid
string
required

The Kraken order identifier. To query multiple orders, use comma delimited list of up to 50 ids.

trades
boolean
default:false

Whether or not to include trades related to position in output

userref
integer<int32>

Restrict results to given user reference id

consolidate_taker
boolean
default:true

Whether or not to consolidate trades by individual taker trades

rebase_multiplier
enum<string> | null
default:rebased

Optional parameter for viewing xstocks data.

  • rebased: Display in terms of underlying equity.
  • base: Display in terms of SPV tokens.
Available options:
rebased,
base

Response

200 - application/json

Orders info retrieved.

result
OpenOrder · object

Open Order

error
string[]

Kraken API error