For the complete documentation index, see llms.txt. This page is also available as Markdown.

assetContext

Get the asset context (mid-, mark- and oracle price for example) of one or more symbols.

Single coin

Request

Field
Type
Description

type

string

Must be "assetContext"

coin

string

symbol e.g. "BTC" or with dex prefix "xyz:XYZ100"

curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "assetContext",
    "coin": "BTC"
  }'
import requests
import os
import json

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'assetContext',
        'coin': 'BTC'
    },
    headers={
        'Authorization': f'Bearer {os.environ["HYDROMANCER_API_KEY"]}',
        'Content-Type': 'application/json'
    }
)

print(json.dumps(response.json(), indent=2))
Response
{
  "oraclePx": "96500.50",
  "markPx": "96485.25",
  "midPx": "96490.50",
  "impactPxs": [ "96490", "96491" ],
  "openInterest": "25401.1214",
  "dayNtlVlm": "1643278247.97882",
  "dayBaseVlm": "26703.40439"
}

Multiple coins

Query up to 20 coins in a single request. Use coins instead of coin.

Field
Type
Description

type

string

Must be "assetContext"

coins

string[]

Array of symbols, max 20. e.g. ["BTC", "ETH"]

Response

Coins that are not found return null in the response map instead of causing a 404.


Response Fields

Field
Type
Description

oraclePx

string?

Oracle price (null if not available)

markPx

string?

Mark price (null if not available)

midPx

string?

Mid price (null if not available)

impactPxs

array?

Avg execution price to trade impact notional (20k$ BTC/ETH, 6k$ other coins) on the bid and ask (null if not available)

openInterest

string?

Number of outstanding contracts (null if not available)

dayNtlVlm

string?

24-hour notional volume — sum of price × size over the trailing 24 hours. "0.0" for an untraded perp; null for a coin absent from the context store, or briefly after a service restart while the 24h window re-seeds (last-known values are preserved where available)

dayBaseVlm

string?

24-hour base volume — sum of size over the trailing 24 hours. "0.0" for an untraded perp; null for a coin absent from the context store, or briefly after a service restart while the 24h window re-seeds (last-known values are preserved where available)

Last updated