curl --request POST \
--url 'https://api.hypedexer.com/info#marketLiquidityHistory' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "marketLiquidityHistory",
"coin": "BTC",
"limit": 2
}
'import requests
url = "https://api.hypedexer.com/info#marketLiquidityHistory"
payload = {
"type": "marketLiquidityHistory",
"coin": "BTC",
"limit": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'marketLiquidityHistory', coin: 'BTC', limit: 2})
};
fetch('https://api.hypedexer.com/info#marketLiquidityHistory', 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.hypedexer.com/info#marketLiquidityHistory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'marketLiquidityHistory',
'coin' => 'BTC',
'limit' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hypedexer.com/info#marketLiquidityHistory"
payload := strings.NewReader("{\n \"type\": \"marketLiquidityHistory\",\n \"coin\": \"BTC\",\n \"limit\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.hypedexer.com/info#marketLiquidityHistory")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"marketLiquidityHistory\",\n \"coin\": \"BTC\",\n \"limit\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hypedexer.com/info#marketLiquidityHistory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"marketLiquidityHistory\",\n \"coin\": \"BTC\",\n \"limit\": 2\n}"
response = http.request(request)
puts response.read_body[
{
"time": 1793449641000,
"coin": "BTC",
"midPx": "77560.5",
"spreadBps": 0.12893160822841523,
"depth": {
"10bps": {
"bid": "2241386.58",
"ask": "7566251.33"
},
"50bps": {
"bid": "2241386.58",
"ask": "7566251.33"
},
"100bps": {
"bid": "2241386.58",
"ask": "7566251.33"
}
},
"slippageBps": {
"10k": 0.0645,
"100k": 0.0645,
"1m": 0.6715
}
}
]{
"error": "Invalid API key"
}Market liquidity history
Time series of the marketLiquidity samples of one market, about every 60 seconds: mid price, spread, bid and ask depth (USD) within 10, 50 and 100 bps of the mid, and slippage of a 10k, 100k and 1M USD market order.
Unlike the other history types, the response is a plain array of samples (no coin / history wrapper).
Window and limit: limit returns the newest limit samples inside [startTime, endTime], oldest first. startTime does not set the first sample: to read a past period, set endTime (and startTime) around it.
Retention: 180 days, from 28 July 2026. Without startTime the window starts 7 days ago, so an older window needs startTime.
curl --request POST \
--url 'https://api.hypedexer.com/info#marketLiquidityHistory' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "marketLiquidityHistory",
"coin": "BTC",
"limit": 2
}
'import requests
url = "https://api.hypedexer.com/info#marketLiquidityHistory"
payload = {
"type": "marketLiquidityHistory",
"coin": "BTC",
"limit": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'marketLiquidityHistory', coin: 'BTC', limit: 2})
};
fetch('https://api.hypedexer.com/info#marketLiquidityHistory', 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.hypedexer.com/info#marketLiquidityHistory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'marketLiquidityHistory',
'coin' => 'BTC',
'limit' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hypedexer.com/info#marketLiquidityHistory"
payload := strings.NewReader("{\n \"type\": \"marketLiquidityHistory\",\n \"coin\": \"BTC\",\n \"limit\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.hypedexer.com/info#marketLiquidityHistory")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"marketLiquidityHistory\",\n \"coin\": \"BTC\",\n \"limit\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hypedexer.com/info#marketLiquidityHistory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"marketLiquidityHistory\",\n \"coin\": \"BTC\",\n \"limit\": 2\n}"
response = http.request(request)
puts response.read_body[
{
"time": 1793449641000,
"coin": "BTC",
"midPx": "77560.5",
"spreadBps": 0.12893160822841523,
"depth": {
"10bps": {
"bid": "2241386.58",
"ask": "7566251.33"
},
"50bps": {
"bid": "2241386.58",
"ask": "7566251.33"
},
"100bps": {
"bid": "2241386.58",
"ask": "7566251.33"
}
},
"slippageBps": {
"10k": 0.0645,
"100k": 0.0645,
"1m": 0.6715
}
}
]{
"error": "Invalid API key"
}Authorizations
Your Hypedexer API key, sent as Authorization: Bearer <key>. The X-API-Key: <key> header and the api_key query parameter are accepted as well.