marketLiquidityHistory
Get hourly-averaged orderbook depth history for a specific market with unlimited retention.
Overview
The marketLiquidityHistory endpoint returns hourly-averaged orderbook depth data for a specific market. It provides the same depth metrics as marketLiquidity but pre-aggregated into hourly buckets with unlimited retention (whereas marketLiquidity is limited to 24 hours).
Key details:
Hourly granularity (average depth per snapshot within each hour)
Unlimited data retention
Depth available at multiple bps levels (2, 5, 10, 25, 25-500)
startTimeis required; results always returned in ascending order
Request
Endpoint: POST /info
type
string
Must be "marketLiquidityHistory"
market
string
Market symbol (e.g., "BTC", "ETH") - required
startTime
integer
Start timestamp in milliseconds - required
endTime
integer
End timestamp in milliseconds (optional)
limit
integer
Max rows to return, default 500, max 2000 (optional)
curl -X POST https://api.hydromancer.xyz/info \
-H "Authorization: Bearer $HYDROMANCER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "marketLiquidityHistory",
"market": "BTC",
"startTime": 1706000000000,
"endTime": 1706100000000,
"limit": 500
}'import requests
import os
response = requests.post(
'https://api.hydromancer.xyz/info',
json={
'type': 'marketLiquidityHistory',
'market': 'BTC',
'startTime': 1706000000000,
'endTime': 1706100000000,
'limit': 500
},
headers={
'Authorization': f'Bearer {os.environ.get("HYDROMANCER_API_KEY")}',
'Content-Type': 'application/json'
}
)
print(response.json())Response Fields
timestamp
Hour start timestamp in milliseconds
market
Market symbol
snapshots
Number of per-market snapshots aggregated in this hour
avgBidDepth2bps
Average bid depth within 2 basis points of mid (in market asset)
avgBidDepth5bps
Average bid depth within 5 basis points of mid (in market asset)
avgBidDepth10bps
Average bid depth within 10 basis points of mid (in market asset)
avgBidDepth25bps
Average bid depth within 25 basis points of mid (in market asset)
avgBidDepth25To500bps
Average bid depth between 25-500 basis points of mid (in market asset)
avgAskDepth2bps
Average ask depth within 2 basis points of mid (in market asset)
avgAskDepth5bps
Average ask depth within 5 basis points of mid (in market asset)
avgAskDepth10bps
Average ask depth within 10 basis points of mid (in market asset)
avgAskDepth25bps
Average ask depth within 25 basis points of mid (in market asset)
avgAskDepth25To500bps
Average ask depth between 25-500 basis points of mid (in market asset)
Comparison with marketLiquidity
Feature
marketLiquidity
marketLiquidityHistory
Granularity
Per-second snapshots
Hourly averages
Retention
24 hours
Unlimited
Values
Total depth per snapshot
Average depth per hour
startTime
Optional (within 24h)
Required
Rate limits
10 points per request
Common errors
400:
market parameter is required- must provide market symbol400:
startTime parameter is required- startTime is mandatory403: Permission denied - check API key
429: Rate limit exceeded
Last updated