Skip to main content
API referenceSubnets

Subnet OHLC

Last updated

GET
/api/v1/subnets/{netuid}/ohlc

Fetch open/high/low/close/volume candles for one subnet's alpha price, bucketed by ?interval= (1h or 1d, default 1h) from the same account_events StakeAdded/StakeRemoved stream as GET /api/v1/subnets/{netuid}/volume — each row is one executed trade, price = amount_tao / alpha_amount. Open/high/low/close are the first/max/min/last trade price in the bucket; volume_alpha/volume_tao are summed amounts. ?days= bounds the lookback window (default 90, max 365). Empty buckets are omitted (a gap, not a synthesized flat candle). The root subnet (netuid 0) has no AMM pool — 1:1 TAO, no price impact — so it returns an empty candle array with root_excluded:true rather than a meaningless flat-line series.

Path Parameters

netuid*integer
Range0 <= value

Query Parameters

interval?string

Value in

  • "1h"
  • "1d"
days?integer
Range1 <= value <= 365

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/subnets/0/ohlc"
{  "data": {    "candles": [      {        "bucket_start": 1,        "bucket_start_iso": "2026-06-01T00:00:00.000Z",        "close": 0.5,        "event_count": 1,        "high": 0.5,        "low": 0.5,        "open": 0.5,        "volume_alpha": 0.5,        "volume_tao": 0.5      }    ],    "interval": "1h",    "netuid": 7,    "root_excluded": false,    "schema_version": 1  },  "meta": {    "artifact_path": "example",    "cache": "short",    "contract_version": "2026-06-29.1",    "generated_at": "2026-06-01T00:00:00.000Z",    "pagination": {      "collection": "example",      "cursor": 1,      "limit": 1,      "next_cursor": 1,      "order": "asc",      "returned": 1,      "sort": "example",      "total": 1    },    "published_at": "2026-06-01T00:00:00.000Z",    "source": "live-cron-prober",    "stale_contract": {      "built_under": "example",      "live": "example"    }  },  "ok": true,  "schema_version": 1}