Skip to content

Stake legs, newest first

GET
/trades/

Buys and sells of alpha against every subnet’s pool, one row per leg, newest first, over the whole history unless dates are given. A swap, move or transfer between subnets shows as its two legs, a sell on the origin and a buy on the destination; a move within one subnet is left out. With netuid, only the subnet now registered there, unless previous_subnets is set. Page numbers reach 10,000 rows deep, then before set to pagination.next_before reads on. Here date_to is exclusive.

Rate limit: 300 requests per minute per IP (scope explore).

Stable: the operation and its fields leave only after 180 days of notice.

  • None
before
string

Cursor {block}-{id}, taken from pagination.next_before. Overrides page and lifts the deep-page cap. 400 on any other format.

coldkey
string

Filter to one coldkey.

date_from
string format: date

Inclusive lower bound, YYYY-MM-DD or an ISO instant. 400 otherwise.

date_to
string format: date

EXCLUSIVE upper bound: the window stops at this day’s 00:00 UTC. Defaults to now. 400 on a bad format.

hotkey
string

Filter to one hotkey. Ignored when validator is set.

max_value_rao
integer

Upper bound on the leg’s rao value. Same validation.

min_value_rao
integer

Lower bound on the leg’s rao value. 400 when negative, not an integer, or above max_value_rao, and, with no netuid, coldkey, hotkey or validator, without a date_from at most 90 days back.

netuid
integer

Filter to one subnet. 0 is root, a real subnet. 400 when not an integer.

operation
string
Allowed values: plain wrapped

wrapped keeps only the legs of a swap, move or transfer of stake; plain keeps the others, buys and sells where TAO entered or left the pool. A move or transfer within one subnet counts as wrapped, and an add_stake inside a batch, with no such wrapper, as plain. 400 on any other value.

page
integer

1-based page number. Defaults to 1; an unparseable value falls back to it.

page_size
integer

Rows per page. Default 50, clamped to [1, 200].

previous_subnets
boolean

With netuid, also the legs of the subnets that held this netuid before the one registered there now, as the extrinsics of a netuid are. Only the literal true enables it.

side
string
Allowed values: buy sell

Direction against TAO. Any other value is ignored and echoes back as null.

success
string
Allowed values: false true

Keep only legs whose extrinsic succeeded, or only those the chain rejected. 400 on any other value.

validator
string

Filter to one validator’s legs. Capped at offset 1000; use before past that.

One page of trades, with the filters applied.

Media typeapplication/json

A page of trades, with the filters it applied echoed back.

object
results
required

This page’s legs, newest first.

Array<object>

One buy or sell of alpha against a subnet’s pool. A swap, move or transfer between subnets makes two rows, its sell and its buy.

object
block
required
integer
timestamp
required

Block time.

string format: date-time
nullable
extrinsic_id
required

An internal number the legs of one extrinsic share, accepted by no route: {block}-{extrinsic_idx} names the extrinsic.

integer
nullable
extrinsic_idx
required

Index of the extrinsic in its block, so {block}-{extrinsic_idx} names it on /extrinsics/{extrinsic_id}/.

integer
nullable
success
required

Whether the extrinsic carrying the leg succeeded.

boolean
nullable
side
required

Direction against TAO: buy puts TAO into a pool, sell takes it out.

  • buy - buy
  • sell - sell
string
Allowed values: buy sell
netuid
required

The subnet whose pool the leg traded with.

integer
counterparty_netuid
required

The other pool of a move, swap or transfer, else null.

integer
nullable
coldkey
required

The coldkey whose stake the leg changed: on the buy leg of a transfer, the recipient.

string
hotkey
required

The hotkey the alpha landed on, for a buy, or left, for a sell.

string
nullable
tao_rao
required

In rao. The TAO paid into the pool on a buy, fee included, or received from it on a sell.

integer
alpha
required

In alpha rao. The alpha received on a buy; on a sell, the alpha swapped net of the pool fee, so the seller parted with slightly more.

integer
nullable
unit_price_rao
required

In rao per whole alpha: tao_rao times 10⁹ over alpha, rounded down. On a sell it divides by the net alpha, so it reads about the pool fee high. Null when alpha is zero or unknown.

integer
nullable
operation
required

add or remove on a plain leg; swap, move or transfer on a leg of a cross-subnet one.

  • add - add
  • remove - remove
  • move - move
  • swap - swap
  • transfer - transfer
string
Allowed values: add remove move swap transfer
pagination
required

Where this page sits in the list, whether another follows, and the cursor that reads it.

object
page
required

1-based, echoed even when before chose the page.

integer
page_size
required

Rows per page, the requested size within the route’s bounds.

integer
total_count
required

Counted from daily totals per subnet, whatever page or before; null when a filter other than netuid, side, success and the dates is set.

integer
nullable
total_pages
required

Pages of total_count, clamped to the deepest page number served; next_before reads past it. Null when total_count is.

integer
nullable
has_next
required

Whether another page can be read, by page number or by next_before.

boolean
has_previous
required

True past page 1, or when reading from a cursor.

boolean
truncated
required

True when more rows exist past the deepest page number served: follow next_before to keep reading.

boolean
next_before
required

Cursor for the next page, {block}-{id}. Pass it back as ?before=. Null at the end.

string
nullable
filters
required

The filters this page applied, echoed back.

object
netuid
required

The netuid filter as applied; null when none was sent.

integer
nullable
date_from
required

Start of the window, 00:00 UTC on the requested day; null for the whole history.

string format: date-time
nullable
date_to
required

EXCLUSIVE end of the window: 00:00 UTC on the requested day, or the time of the request when absent.

string format: date-time
side
required

The side filter as applied; null when none was sent or it was neither buy nor sell.

  • buy - buy
  • sell - sell
nullable
One of:
  • buy - buy
  • sell - sell
string
Allowed values: buy sell
min_value_rao

In rao. The lower bound applied to tao_rao.

integer
nullable
max_value_rao

In rao. The upper bound applied to tao_rao.

integer
nullable
operation

plain or wrapped, as applied.

string
nullable
validator

The validator filter, as sent.

string
nullable

Examples

ExampleTrades

Two buys on subnet 64

{
"results": [
{
"block": 9346393,
"timestamp": "2026-10-23T12:58:24+00:00",
"extrinsic_id": 243375529,
"success": true,
"extrinsic_idx": 28,
"side": "buy",
"netuid": 64,
"coldkey": "5F47Kdb1NmcFVQkW5ZCdj7Ftk4F2YD1HqMc2WjpkUQYM3v54",
"hotkey": "5GKH9FPPnWSUoeeTJp19wVtd84XqFW4pyK2ijV2GsFbhTrP1",
"tao_rao": 186061384,
"alpha": 2732934172,
"unit_price_rao": 68081180,
"operation": "add",
"counterparty_netuid": null
},
{
"block": 9346385,
"timestamp": "2026-10-23T12:56:48+00:00",
"extrinsic_id": 243375351,
"success": true,
"extrinsic_idx": 14,
"side": "buy",
"netuid": 64,
"coldkey": "5E9VoL6JmcMpB4qvfwogqhmXR1Eye3XRKhrwhvsdnJHNYCiq",
"hotkey": "5HK5tp6t2S59DywmHRWPBVJeJ86T61KjurYqeooqj8sREpeN",
"tao_rao": 24395269,
"alpha": 358327553,
"unit_price_rao": 68080918,
"operation": "add",
"counterparty_netuid": null
}
],
"pagination": {
"page": 1,
"page_size": 2,
"has_next": true,
"has_previous": false,
"truncated": false,
"next_before": "9346385-45679076",
"total_count": 730003,
"total_pages": 365002
},
"filters": {
"netuid": 64,
"date_from": null,
"date_to": "2026-10-23T15:47:33.610646+00:00",
"side": null,
"min_value_rao": null,
"max_value_rao": null,
"operation": null,
"validator": null
}
}

A parameter failed its check, which message names. code is usually VALIDATION_ERROR.

Media typeapplication/json

The error envelope every 4xx and 5xx response carries. The introduction lists the code values.

object
error
required

Always true. Lets a client branch without reading the status code.

boolean
code
required

Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.

string
message
required

One human-readable sentence.

string
detail
required

Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.

nullable

Examples

ExampleVALIDATIONERROR

VALIDATION_ERROR

{
"error": true,
"code": "VALIDATION_ERROR",
"message": "before must be <block_id>-<id>",
"detail": null
}

Rate limit exceeded (300/minute, per IP). Retry-After carries the seconds to wait.

Media typeapplication/json

The error envelope every 4xx and 5xx response carries. The introduction lists the code values.

object
error
required

Always true. Lets a client branch without reading the status code.

boolean
code
required

Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.

string
message
required

One human-readable sentence.

string
detail
required

Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.

nullable

Examples

ExampleRATELIMITED

RATE_LIMITED

{
"error": true,
"code": "RATE_LIMITED",
"message": "Request was throttled",
"detail": {
"retry_after": 12
}
}
Retry-After
integer

Seconds before the next request is accepted.

QUERY_TIMEOUT: the query exceeded its budget. detail carries budget_ms, elapsed_ms, path and query.

Media typeapplication/json

The error envelope every 4xx and 5xx response carries. The introduction lists the code values.

object
error
required

Always true. Lets a client branch without reading the status code.

boolean
code
required

Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.

string
message
required

One human-readable sentence.

string
detail
required

Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.

nullable

Examples

ExampleQUERYTIMEOUT

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"
}
}