OHLCV candles for one subnet
Candles of one subnet’s alpha price in TAO per alpha, oldest first, each starting at time in UNIX seconds, with the TAO swapped through the pool during the bucket as volume. Widths run from 1 minute to 1 week (resolution), and weeks start on Monday. Without from, the newest limit candles up to to or now; with it, the oldest limit from it. On aggregated widths both bounds snap to bucket edges, so every candle covers its whole bucket.
Rate limit: 2000 requests per minute per IP (scope subnet_price).
Stable: the operation and its fields leave only after 180 days of notice.
Authorizations
Section titled “Authorizations”- None
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Lower bound: an ISO date/datetime, or UNIX seconds (milliseconds above 1e12). An unparseable value is ignored, never a 400.
Maximum rows. Default per-resolution (365 at D, 720 at most minute widths), clamped to 10000. An unparseable value falls back to the default.
Subnet netuid. 400 when missing or not an integer.
Candle width in minutes, or D/W. 400 on any other value. Default 60.
Upper bound, same formats as from. Without from, the page is the newest limit bars up to it.
Responses
Section titled “Responses”The candles, oldest first; a bucket with no recorded price has none.
object
The candle width: 1, 5, 15, 30, 60 or 240 minutes, D or W.
Candles in results.
Oldest first. A bucket with no recorded price has no candle.
object
In UNIX seconds. The start of the bucket: days start at 00:00 UTC, weeks on Monday.
In TAO per alpha. The price at the bucket’s open, the previous candle’s close.
In TAO per alpha. The highest price during the bucket.
In TAO per alpha. The lowest price during the bucket.
In TAO per alpha. The price at the bucket’s close; the newest candle can still be open.
In TAO. Swap volume through the subnet’s pool during the bucket, buys and sells added together.
Examples
Two daily candles of subnet 64
{ "netuid": 64, "resolution": "D", "count": 2, "results": [ { "time": 1792627200, "open": 0.067109159, "high": 0.068240326, "low": 0.067109083, "close": 0.067867348, "volume": 6549.837576187999 }, { "time": 1792713600, "open": 0.067867348, "high": 0.068061833, "low": 0.067867272, "close": 0.068039508, "volume": 398.21830664600003 } ]}A parameter failed its check, which message names. code is usually VALIDATION_ERROR.
The error envelope every 4xx and 5xx response carries. The introduction lists the code values.
object
Always true. Lets a client branch without reading the status code.
Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.
One human-readable sentence.
Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.
Examples
VALIDATION_ERROR
{ "error": true, "code": "VALIDATION_ERROR", "message": "netuid is required", "detail": null}Rate limit exceeded (2000/minute, per IP). Retry-After carries the seconds to wait.
The error envelope every 4xx and 5xx response carries. The introduction lists the code values.
object
Always true. Lets a client branch without reading the status code.
Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.
One human-readable sentence.
Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.
Examples
RATE_LIMITED
{ "error": true, "code": "RATE_LIMITED", "message": "Request was throttled", "detail": { "retry_after": 12 }}Headers
Section titled “Headers”Seconds before the next request is accepted.
QUERY_TIMEOUT: the query exceeded its budget. detail carries budget_ms, elapsed_ms, path and query.
The error envelope every 4xx and 5xx response carries. The introduction lists the code values.
object
Always true. Lets a client branch without reading the status code.
Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.
One human-readable sentence.
Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.
Examples
QUERY_TIMEOUT
{ "error": true, "code": "QUERY_TIMEOUT", "message": "query exceeded the 12000 ms budget; retry, or narrow the requested range", "detail": { "budget_ms": 12000, "elapsed_ms": 12004, "path": "/trades/summary/", "query": "coldkey=5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&resolution=day" }}