curl --request POST \
--url https://api.kraken.com/0/private/OpenOrders \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1234567,
"trades": true,
"cl_ord_id": "9cc788d8-9c00-4b25-94d3-26d93603948d"
}
'import requests
url = "https://api.kraken.com/0/private/OpenOrders"
payload = {
"nonce": 1234567,
"trades": True,
"cl_ord_id": "9cc788d8-9c00-4b25-94d3-26d93603948d"
}
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: 1234567,
trades: true,
cl_ord_id: '9cc788d8-9c00-4b25-94d3-26d93603948d'
})
};
fetch('https://api.kraken.com/0/private/OpenOrders', 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/OpenOrders"
payload := strings.NewReader("{\n \"nonce\": 1234567,\n \"trades\": true,\n \"cl_ord_id\": \"9cc788d8-9c00-4b25-94d3-26d93603948d\"\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": {
"open": {
"OQCLML-BW3P3-BUCMWZ": {
"refid": "None",
"userref": 0,
"status": "open",
"opentm": 1688666559.8974,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "XBTUSD",
"type": "buy",
"ordertype": "limit",
"price": "30010.0",
"price2": "0",
"leverage": "none",
"order": "buy 1.25000000 XBTUSD @ limit 30010.0",
"close": ""
},
"vol": "1.25000000",
"vol_exec": "0.37500000",
"cost": "11253.7",
"fee": "0.00000",
"price": "30010.0",
"stopprice": "0.00000",
"limitprice": "0.00000",
"misc": "",
"oflags": "fciq",
"trades": [
"TCCCTY-WE2O6-P3NB37"
]
},
"OB5VMB-B4U2U-DK2WRW": {
"refid": "None",
"userref": 45326,
"status": "open",
"opentm": 1688665899.5699,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "XBTUSD",
"type": "buy",
"ordertype": "limit",
"price": "14500.0",
"price2": "0",
"leverage": "5:1",
"order": "buy 0.27500000 XBTUSD @ limit 14500.0 with 5:1 leverage",
"close": ""
},
"vol": "0.27500000",
"vol_exec": "0.00000000",
"cost": "0.00000",
"fee": "0.00000",
"price": "0.00000",
"stopprice": "0.00000",
"limitprice": "0.00000",
"misc": "",
"oflags": "fciq"
}
}
}
}Get Open Orders
Retrieve information about currently open orders.
API Key Permissions Required: Orders and trades - Query open orders & trades
curl --request POST \
--url https://api.kraken.com/0/private/OpenOrders \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1234567,
"trades": true,
"cl_ord_id": "9cc788d8-9c00-4b25-94d3-26d93603948d"
}
'import requests
url = "https://api.kraken.com/0/private/OpenOrders"
payload = {
"nonce": 1234567,
"trades": True,
"cl_ord_id": "9cc788d8-9c00-4b25-94d3-26d93603948d"
}
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: 1234567,
trades: true,
cl_ord_id: '9cc788d8-9c00-4b25-94d3-26d93603948d'
})
};
fetch('https://api.kraken.com/0/private/OpenOrders', 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/OpenOrders"
payload := strings.NewReader("{\n \"nonce\": 1234567,\n \"trades\": true,\n \"cl_ord_id\": \"9cc788d8-9c00-4b25-94d3-26d93603948d\"\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": {
"open": {
"OQCLML-BW3P3-BUCMWZ": {
"refid": "None",
"userref": 0,
"status": "open",
"opentm": 1688666559.8974,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "XBTUSD",
"type": "buy",
"ordertype": "limit",
"price": "30010.0",
"price2": "0",
"leverage": "none",
"order": "buy 1.25000000 XBTUSD @ limit 30010.0",
"close": ""
},
"vol": "1.25000000",
"vol_exec": "0.37500000",
"cost": "11253.7",
"fee": "0.00000",
"price": "30010.0",
"stopprice": "0.00000",
"limitprice": "0.00000",
"misc": "",
"oflags": "fciq",
"trades": [
"TCCCTY-WE2O6-P3NB37"
]
},
"OB5VMB-B4U2U-DK2WRW": {
"refid": "None",
"userref": 45326,
"status": "open",
"opentm": 1688665899.5699,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "XBTUSD",
"type": "buy",
"ordertype": "limit",
"price": "14500.0",
"price2": "0",
"leverage": "5:1",
"order": "buy 0.27500000 XBTUSD @ limit 14500.0 with 5:1 leverage",
"close": ""
},
"vol": "0.27500000",
"vol_exec": "0.00000000",
"cost": "0.00000",
"fee": "0.00000",
"price": "0.00000",
"stopprice": "0.00000",
"limitprice": "0.00000",
"misc": "",
"oflags": "fciq"
}
}
}
}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.
Query Parameters
Public wallet account ID. Omit to use the authenticated user's default wallet. See List Wallet Accounts.
Body
Nonce used in construction of API-Sign header
Whether or not to include trades related to position in output
Restrict results to given user reference
Restrict results to given client order id
Whether or not to consolidate trades by individual taker trades
Use cursor-based pagination. Each page then holds at most limit orders, and the response includes cursor.next when more orders are available.
Maximum number of orders to return. When with_cursor is true, defaults to 50 and values above 100 are rejected. Otherwise all open orders are returned unless limit is set (capped at 1000).
x >= 1Opaque pagination token from cursor.next of the previous page. Requires with_cursor.
Optional parameter for viewing xStocks data.
rebased: Display in terms of underlying equity.base: Display in terms of SPV tokens.
rebased, base Was this page helpful?