Query L3 Order Book
curl --request POST \
--url https://api.kraken.com/0/private/Level3 \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 123,
"pair": "YFI/EUR",
"depth": 10
}
'import requests
url = "https://api.kraken.com/0/private/Level3"
payload = {
"nonce": 123,
"pair": "YFI/EUR",
"depth": 10
}
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: 123, pair: 'YFI/EUR', depth: 10})
};
fetch('https://api.kraken.com/0/private/Level3', 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/Level3"
payload := strings.NewReader("{\n \"nonce\": 123,\n \"pair\": \"YFI/EUR\",\n \"depth\": 10\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": {
"pair": "YFI/EUR",
"bids": [
{
"price": "3062.00000",
"qty": "0.29665800",
"order_id": "O5KJU4-IEQTM-NDMS6W",
"timestamp": 1765622008594292000
},
{
"price": "3062.00000",
"qty": "0.13917400",
"order_id": "OERRY6-MXYER-6EQKNY",
"timestamp": 1765622011396903000
}
],
"asks": [
{
"price": "3066.00000",
"qty": "0.00278335",
"order_id": "ORAWGV-N5L4J-LBA3WH",
"timestamp": 1765622008499456000
},
{
"price": "3067.00000",
"qty": "0.13902210",
"order_id": "OZWNZS-QE3G6-ZPKZUT",
"timestamp": 1765622021013826600
}
]
}
}Market Data
Query L3 Order Book
Retrieve Level3 order book data, which provides individual order information at each price level. This includes order IDs and timestamps for each order in the book.
The Level3 endpoint requires authentication.
API Key Permissions Required: Orders and trades - Query open orders & trades
POST
/
private
/
Level3
Query L3 Order Book
curl --request POST \
--url https://api.kraken.com/0/private/Level3 \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 123,
"pair": "YFI/EUR",
"depth": 10
}
'import requests
url = "https://api.kraken.com/0/private/Level3"
payload = {
"nonce": 123,
"pair": "YFI/EUR",
"depth": 10
}
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: 123, pair: 'YFI/EUR', depth: 10})
};
fetch('https://api.kraken.com/0/private/Level3', 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/Level3"
payload := strings.NewReader("{\n \"nonce\": 123,\n \"pair\": \"YFI/EUR\",\n \"depth\": 10\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": {
"pair": "YFI/EUR",
"bids": [
{
"price": "3062.00000",
"qty": "0.29665800",
"order_id": "O5KJU4-IEQTM-NDMS6W",
"timestamp": 1765622008594292000
},
{
"price": "3062.00000",
"qty": "0.13917400",
"order_id": "OERRY6-MXYER-6EQKNY",
"timestamp": 1765622011396903000
}
],
"asks": [
{
"price": "3066.00000",
"qty": "0.00278335",
"order_id": "ORAWGV-N5L4J-LBA3WH",
"timestamp": 1765622008499456000
},
{
"price": "3067.00000",
"qty": "0.13902210",
"order_id": "OZWNZS-QE3G6-ZPKZUT",
"timestamp": 1765622021013826600
}
]
}
}Authorizations
Body
application/json
Was this page helpful?