curl --request GET \
--url https://api.amberdata.com/markets/spot/analytics/depth/average-time-series \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/spot/analytics/depth/average-time-series"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.amberdata.com/markets/spot/analytics/depth/average-time-series', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.amberdata.com/markets/spot/analytics/depth/average-time-series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.amberdata.com/markets/spot/analytics/depth/average-time-series"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.amberdata.com/markets/spot/analytics/depth/average-time-series")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/spot/analytics/depth/average-time-series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"data": [
{
"basisPoints005OrderCount": 50.11585807385952,
"basisPoints005UsdMillion": 0.8164277240123664,
"basisPoints010OrderCount": 101.4076755973932,
"basisPoints010UsdMillion": 2.4200052792833198,
"basisPoints015OrderCount": 139.33526430123098,
"basisPoints015UsdMillion": 4.032354567973533,
"basisPoints020OrderCount": 165.07965242577842,
"basisPoints020UsdMillion": 5.12001239439905,
"basisPoints025OrderCount": 186.58435916002895,
"basisPoints025UsdMillion": 6.4849871469881615,
"basisPoints050OrderCount": 276.2288196958726,
"basisPoints050UsdMillion": 9.863984912294022,
"basisPoints075OrderCount": 378.10065170166547,
"basisPoints075UsdMillion": 12.520908232726379,
"basisPoints100OrderCount": 488.112961622013,
"basisPoints100UsdMillion": 14.552850237163344,
"basisPoints125OrderCount": 598.8146270818247,
"basisPoints125UsdMillion": 15.676340302313667,
"basisPoints150OrderCount": 711.1810282404055,
"basisPoints150UsdMillion": 16.402634998926477,
"basisPoints175OrderCount": 818.9471397538016,
"basisPoints175UsdMillion": 17.074406562577984,
"basisPoints200OrderCount": 924.6719768283853,
"basisPoints200UsdMillion": 17.7662278250877,
"basisPoints225OrderCount": 1028.8030412744388,
"basisPoints225UsdMillion": 18.780723026978027,
"basisPoints250OrderCount": 1132.925416364953,
"basisPoints250UsdMillion": 19.831425427851418,
"basisPoints275OrderCount": 1237.8616944243302,
"basisPoints275UsdMillion": 20.828206747480827,
"basisPoints300OrderCount": 1343.599565532223,
"basisPoints300UsdMillion": 21.786886527157147,
"basisPoints325OrderCount": 1450.9840695148444,
"basisPoints325UsdMillion": 22.605037085982346,
"basisPoints350OrderCount": 1559.1361332367849,
"basisPoints350UsdMillion": 23.519621849718725,
"basisPoints375OrderCount": 1667.697320782042,
"basisPoints375UsdMillion": 24.349440955298423,
"basisPoints400OrderCount": 1776.0296886314266,
"basisPoints400UsdMillion": 25.35195996759689,
"basisPoints425OrderCount": 1883.4627081824765,
"basisPoints425UsdMillion": 26.237260796265836,
"basisPoints450OrderCount": 1992.1223750905142,
"basisPoints450UsdMillion": 27.07583659480697,
"basisPoints475OrderCount": 2104.102099927589,
"basisPoints475UsdMillion": 27.9825818053164,
"basisPoints500OrderCount": 2218.6082548877625,
"basisPoints500UsdMillion": 28.787407998145866,
"exchange": "gdax",
"pair": "btc_usd",
"side": "ask",
"timestamp": "2025-03-11 00:00:00 000"
}
]
}
}{}Average Depth
This endpoint allows user to view the average order book depth sizes per level. The depth will be displayed in base terms for a given pair, meaning btc_usd will have depth in btc terms. This endpoint is useful to quickly observe what times liquidity enters the market.
curl --request GET \
--url https://api.amberdata.com/markets/spot/analytics/depth/average-time-series \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/spot/analytics/depth/average-time-series"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.amberdata.com/markets/spot/analytics/depth/average-time-series', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.amberdata.com/markets/spot/analytics/depth/average-time-series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.amberdata.com/markets/spot/analytics/depth/average-time-series"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.amberdata.com/markets/spot/analytics/depth/average-time-series")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/spot/analytics/depth/average-time-series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"data": [
{
"basisPoints005OrderCount": 50.11585807385952,
"basisPoints005UsdMillion": 0.8164277240123664,
"basisPoints010OrderCount": 101.4076755973932,
"basisPoints010UsdMillion": 2.4200052792833198,
"basisPoints015OrderCount": 139.33526430123098,
"basisPoints015UsdMillion": 4.032354567973533,
"basisPoints020OrderCount": 165.07965242577842,
"basisPoints020UsdMillion": 5.12001239439905,
"basisPoints025OrderCount": 186.58435916002895,
"basisPoints025UsdMillion": 6.4849871469881615,
"basisPoints050OrderCount": 276.2288196958726,
"basisPoints050UsdMillion": 9.863984912294022,
"basisPoints075OrderCount": 378.10065170166547,
"basisPoints075UsdMillion": 12.520908232726379,
"basisPoints100OrderCount": 488.112961622013,
"basisPoints100UsdMillion": 14.552850237163344,
"basisPoints125OrderCount": 598.8146270818247,
"basisPoints125UsdMillion": 15.676340302313667,
"basisPoints150OrderCount": 711.1810282404055,
"basisPoints150UsdMillion": 16.402634998926477,
"basisPoints175OrderCount": 818.9471397538016,
"basisPoints175UsdMillion": 17.074406562577984,
"basisPoints200OrderCount": 924.6719768283853,
"basisPoints200UsdMillion": 17.7662278250877,
"basisPoints225OrderCount": 1028.8030412744388,
"basisPoints225UsdMillion": 18.780723026978027,
"basisPoints250OrderCount": 1132.925416364953,
"basisPoints250UsdMillion": 19.831425427851418,
"basisPoints275OrderCount": 1237.8616944243302,
"basisPoints275UsdMillion": 20.828206747480827,
"basisPoints300OrderCount": 1343.599565532223,
"basisPoints300UsdMillion": 21.786886527157147,
"basisPoints325OrderCount": 1450.9840695148444,
"basisPoints325UsdMillion": 22.605037085982346,
"basisPoints350OrderCount": 1559.1361332367849,
"basisPoints350UsdMillion": 23.519621849718725,
"basisPoints375OrderCount": 1667.697320782042,
"basisPoints375UsdMillion": 24.349440955298423,
"basisPoints400OrderCount": 1776.0296886314266,
"basisPoints400UsdMillion": 25.35195996759689,
"basisPoints425OrderCount": 1883.4627081824765,
"basisPoints425UsdMillion": 26.237260796265836,
"basisPoints450OrderCount": 1992.1223750905142,
"basisPoints450UsdMillion": 27.07583659480697,
"basisPoints475OrderCount": 2104.102099927589,
"basisPoints475UsdMillion": 27.9825818053164,
"basisPoints500OrderCount": 2218.6082548877625,
"basisPoints500UsdMillion": 28.787407998145866,
"exchange": "gdax",
"pair": "btc_usd",
"side": "ask",
"timestamp": "2025-03-11 00:00:00 000"
}
]
}
}{}Authorizations
Query Parameters
[Required] The select exchange for which to view average liquidity depth.
[Examples] gdax | okex | binance | binanceus
[Required] The currency pair for which to view average liquidity depth.
[Examples] btc_usd | btc_usdc | eth_usd
[Optional] Payload only includes data after this date (inclusive).
[Formats] seconds | milliseconds | iso8601
[Examples] 1578531600 | 1578531600000 | 2025-02-27
[Optional] Payload only includes data up to this date (exclusive).
[Formats] seconds | milliseconds | iso8601
[Examples] 1578531600 | 1578531600000 | 2025-02-28
[Optional] Time interval of data frequency for the selected date range.
[Examples] hour | day
[Optional] Time format of the timestamps in the return payload.
[Defaults] milliseconds | ms* | iso | iso8601 | hr | human_readable
Was this page helpful?