marketLiquidity

Get aggregated orderbook depth for a specific market

Overview

The marketLiquidity endpoint returns aggregated orderbook depth data for a specific market.

Key details:

  • Refreshed every second

  • Data retained for 24 hours

  • Depth available at multiple bps levels (2, 5, 10, 25, 25-500)

  • Supports time-based filtering (up to 24h back)

Request

Endpoint: POST /info

Field
Type
Description

type

string

Must be "marketLiquidity"

market

string

Market symbol (e.g., "BTC", "flx:TSLA") - required

startTime

integer

Start timestamp in milliseconds, must be within 24h (optional)

endTime

integer

End timestamp in milliseconds, used with startTime (optional)

limit

integer

Max rows to return, default/max 500 (optional)

Note: When startTime is provided, results are returned in ascending order (oldest first). Without startTime, results are returned in descending order (newest first).

import requests 
import os
response = requests.post(
    'https://api.hydromancer.xyz/info', 
    json={ 'type': 'marketLiquidity', 'market': 'BTC', 'limit': 100 }, 
    headers={ 
        'Authorization': f'Bearer {os.environ.get("HYDROMANCER_API_KEY")}', 
        'Content-Type': 'application/json' 
        } 
    )
print(response.json())
Response Fields
Field
Description

timestamp

Snapshot timestamp in milliseconds

market

Market symbol

bestBidPrice

Best bid price across all addresses

bestAskPrice

Best ask price across all addresses

bidDepth2bps

Total bid depth within 2 basis points of mid (in market asset)

bidDepth5bps

Total bid depth within 5 basis points of mid (in market asset)

bidDepth10bps

Total bid depth within 10 basis points of mid (in market asset)

bidDepth25bps

Total bid depth within 25 basis points of mid (in market asset)

bidDepth25To500bps

Total bid depth between 25-500 basis points of mid (in market asset)

askDepth2bps

Total ask depth within 2 basis points of mid (in market asset)

askDepth5bps

Total ask depth within 5 basis points of mid (in market asset)

askDepth10bps

Total ask depth within 10 basis points of mid (in market asset)

askDepth25bps

Total ask depth within 25 basis points of mid (in market asset)

askDepth25To500bps

Total ask depth between 25-500 basis points of mid (in market asset)

Rate limits

  • 10 points per request

Common errors

  • 400: market parameter is required - must provide market symbol

  • 400: startTime cannot be more than 24 hours in the past - time filter limit

  • 403: Permission denied - check API key

  • 429: Rate limit exceeded

Last updated