Skip to content

Rolling stake-flow window

GET
/trades/stats/rolling/

The stake-flow splits of /trades/stats/ over the last hours complete hours, overall and per subnet, with the change in volume and in trade count, in percent, against the window of equal length before it.

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

  • None
hours
integer

Window length, 1 to 168, default 24. Clamped into that range; anything unreadable falls back to 24.

The flow over the window, with its change against the window before.

Media typeapplication/json

The last window_hours complete hours, against the window of equal length before them. The open hour is left out, so both windows are whole.

object
tao_to_subnets
required

Stakes that brought TAO from a free balance into a subnet, the legs of swaps, moves and transfers left out.

object
trades
required

Operations counted: stake legs, or on cross_subnet the swaps, moves and transfers themselves.

integer
tao_volume_rao
required

In rao. The TAO they moved; on totals, into and out of subnets only, cross_subnet left out.

integer
tao_volume
required

In TAO. The same value as tao_volume_rao.

number format: double
subnets_to_tao
required

Unstakes that returned TAO to a free balance, the legs of swaps, moves and transfers left out.

object
trades
required

Operations counted: stake legs, or on cross_subnet the swaps, moves and transfers themselves.

integer
tao_volume_rao
required

In rao. The TAO they moved; on totals, into and out of subnets only, cross_subnet left out.

integer
tao_volume
required

In TAO. The same value as tao_volume_rao.

number format: double
cross_subnet
required

Swaps, moves and transfers of stake, one each, those within one subnet included: alpha changing place, no TAO entering or leaving.

object
trades
required

Operations counted: stake legs, or on cross_subnet the swaps, moves and transfers themselves.

integer
tao_volume_rao
required

In rao. The TAO they moved; on totals, into and out of subnets only, cross_subnet left out.

integer
tao_volume
required

In TAO. The same value as tao_volume_rao.

number format: double
totals
required

The three blocks added up, except the volume, which leaves cross_subnet out.

object
trades
required

Operations counted: stake legs, or on cross_subnet the swaps, moves and transfers themselves.

integer
tao_volume_rao
required

In rao. The TAO they moved; on totals, into and out of subnets only, cross_subnet left out.

integer
tao_volume
required

In TAO. The same value as tao_volume_rao.

number format: double
net_tao_flow
required

tao_to_subnets minus subnets_to_tao.

object
tao_volume_rao
required

TAO into subnets minus TAO out; negative on a net outflow.

integer
tao_volume
required

In TAO. The same value as tao_volume_rao.

number format: double
by_subnet
required

Keyed by netuid, as a string, ascending. Signed stake legs only (cross-subnet legs kept, same-subnet rebalances removed): unlike the candle volume, it leaves out the fund’s claim sells, rebalances and share purchases, which emit no stake event.

object
key
additional properties
object
in_count
required

Stake legs into this subnet, the buy legs of cross-subnet swaps, moves and transfers included.

integer
in_rao
required

In rao. The TAO those legs put in.

integer
in_tao
required

In TAO. The same value as in_rao.

number format: double
out_count
required

Stake legs out of this subnet, the sell legs of cross-subnet swaps, moves and transfers included.

integer
out_rao
required

In rao. The TAO those legs took out.

integer
out_tao
required

In TAO. The same value as out_rao.

number format: double
window_hours
required

The window’s length: hours clamped to 1 to 168, 24 when absent or unreadable.

integer
since
required

Start of the window, the first complete hour it covers.

string format: date-time
change_pct
required

Against the window of the same length just before this one.

object
volume
required

Null when the previous window had no volume.

number format: double
nullable
trades
required

Percent, signed: the change of totals.trades. Null when the previous window had no trade.

number format: double
nullable

Example generated

{
"tao_to_subnets": {
"trades": 1,
"tao_volume_rao": 1,
"tao_volume": 1
},
"subnets_to_tao": {
"trades": 1,
"tao_volume_rao": 1,
"tao_volume": 1
},
"cross_subnet": {
"trades": 1,
"tao_volume_rao": 1,
"tao_volume": 1
},
"totals": {
"trades": 1,
"tao_volume_rao": 1,
"tao_volume": 1
},
"net_tao_flow": {
"tao_volume_rao": 1,
"tao_volume": 1
},
"by_subnet": {
"additionalProperty": {
"in_count": 1,
"in_rao": 1,
"in_tao": 1,
"out_count": 1,
"out_rao": 1,
"out_tao": 1
}
},
"window_hours": 1,
"since": "2026-04-15T12:00:00Z",
"change_pct": {
"volume": 1,
"trades": 1
}
}

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.