Get Grouped Order Book
curl --request GET \
--url https://api.kraken.com/0/public/GroupedBookimport requests
url = "https://api.kraken.com/0/public/GroupedBook"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.kraken.com/0/public/GroupedBook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kraken.com/0/public/GroupedBook"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": [],
"result": {
"pair": "BTC/USD",
"grouping": 1000,
"bids": [
{
"price": "90400.00000",
"qty": "19.83057746"
},
{
"price": "90300.00000",
"qty": "45.35073006"
},
{
"price": "90200.00000",
"qty": "35.33199856"
},
{
"price": "90100.00000",
"qty": "32.40807838"
},
{
"price": "90000.00000",
"qty": "46.00445468"
},
{
"price": "89900.00000",
"qty": "22.71486458"
},
{
"price": "89800.00000",
"qty": "11.55482018"
},
{
"price": "89700.00000",
"qty": "13.77715743"
},
{
"price": "89600.00000",
"qty": "27.72185770"
},
{
"price": "89500.00000",
"qty": "14.09383330"
}
],
"asks": [
{
"price": "90500.00000",
"qty": "38.96185061"
},
{
"price": "90600.00000",
"qty": "55.96402032"
},
{
"price": "90700.00000",
"qty": "34.64783055"
},
{
"price": "90800.00000",
"qty": "25.26797469"
},
{
"price": "90900.00000",
"qty": "20.48922196"
},
{
"price": "91000.00000",
"qty": "14.87773628"
},
{
"price": "91100.00000",
"qty": "18.99740224"
},
{
"price": "91200.00000",
"qty": "19.00592802"
},
{
"price": "91300.00000",
"qty": "4.05573682"
},
{
"price": "91400.00000",
"qty": "1.60667017"
}
]
}
}Market Data
Get Grouped Order Book
The GroupedBook endpoint aggregates the volume in the order book over a specified tick range. It provides a summary of liquidity deep into the book, useful for user interface display.
Bids and asks between grouped price levels are accumulated to the nearest passive level (asks rounded up, bids down).
GET
/
public
/
GroupedBook
Get Grouped Order Book
curl --request GET \
--url https://api.kraken.com/0/public/GroupedBookimport requests
url = "https://api.kraken.com/0/public/GroupedBook"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.kraken.com/0/public/GroupedBook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kraken.com/0/public/GroupedBook"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": [],
"result": {
"pair": "BTC/USD",
"grouping": 1000,
"bids": [
{
"price": "90400.00000",
"qty": "19.83057746"
},
{
"price": "90300.00000",
"qty": "45.35073006"
},
{
"price": "90200.00000",
"qty": "35.33199856"
},
{
"price": "90100.00000",
"qty": "32.40807838"
},
{
"price": "90000.00000",
"qty": "46.00445468"
},
{
"price": "89900.00000",
"qty": "22.71486458"
},
{
"price": "89800.00000",
"qty": "11.55482018"
},
{
"price": "89700.00000",
"qty": "13.77715743"
},
{
"price": "89600.00000",
"qty": "27.72185770"
},
{
"price": "89500.00000",
"qty": "14.09383330"
}
],
"asks": [
{
"price": "90500.00000",
"qty": "38.96185061"
},
{
"price": "90600.00000",
"qty": "55.96402032"
},
{
"price": "90700.00000",
"qty": "34.64783055"
},
{
"price": "90800.00000",
"qty": "25.26797469"
},
{
"price": "90900.00000",
"qty": "20.48922196"
},
{
"price": "91000.00000",
"qty": "14.87773628"
},
{
"price": "91100.00000",
"qty": "18.99740224"
},
{
"price": "91200.00000",
"qty": "19.00592802"
},
{
"price": "91300.00000",
"qty": "4.05573682"
},
{
"price": "91400.00000",
"qty": "1.60667017"
}
]
}
}Query Parameters
Asset pair to get order book for
The number of price levels to return per side (bids/asks).
Available options:
10, 25, 100, 250, 1000 Specifies how many tick levels should be within each price level. Bids and asks between grouped price levels are accumulated to the nearest passive level (asks rounded up, bids down).
Available options:
1, 5, 10, 25, 50, 100, 250, 500, 1000 Was this page helpful?