Skip to content
TAO$194.30
BTC0.003103
MCap$2.28B
Vol$180.39M

API reference / Accounts

An account's gamma deposits: those it owns and those it may spend

GET/api/v2/accounts/{address}/gamma
Status
Beta
Auth
API key or OAuth access token
Scope
data:read
Rate limit
plan

Beta. Gamma is a subnet's service credit: minted by burning the subnet's alpha (bought with TAO, or taken from the minter's stake), valued in US dollars at the mint (one gamma = one US dollar at the mint's price; amounts are in gamma rao, 10^9 per gamma), held in a deposit (SubtensorModule.GammaDeposits, keyed by subnet and hotkey) and burned by the deposit's one spender. Two lists, each by subnet then hotkey: owned, the deposits whose owner is the account now (a coldkey swap moves them to the new coldkey), and spendable, the deposits the account may spend. Deposits at balance 0 are left out unless include_empty=true. limit applies to each list; one meta.page.next_cursor continues both (a list already complete comes back []). Cached as the head. Errors are application/problem+json: INVALID_ADDRESS, INVALID_BOOLEAN (include_empty), INVALID_LIMIT, INVALID_CURSOR, UNKNOWN_PARAMETER; SOURCE_TIMEOUT (503), SOURCE_NOT_READY (503: this deployment's data source is not configured, or does not serve gamma yet), SERVICE_UNAVAILABLE (503).

Beta: this route may change with one release's notice in the v2 changelog; additive changes need none (x-stability: beta).

Path parameters

addresspath, required· string

The account: SS58, or 0x + 64 hex.

Query parameters

include_emptyquery· enum · one of true, false

true lists deposits at balance 0 too (a deposit stays at 0 until its owner closes it); default false. true or false (lower-case; anything else is a 400 INVALID_BOOLEAN).

limitquery· integer · default 50 · 1 to 100

Rows per page, 1..100 (default 50). Anything else is a 400 INVALID_LIMIT.

cursorquery· string · up to 400 characters

meta.page.next_cursor of the previous page, passed back unchanged with the same other parameters. It is opaque and bound to them: a cursor used with different parameters, or altered, is a 400 INVALID_CURSOR.

Response

data is an object with these fields. Amounts are integer strings in their base unit, and null means unknown, never zero (see Units and formats). meta.at names the block the answer was read at.

The owned and the spendable deposits.

ownedarray of objects

Deposits whose owner (coldkey) is the account now, by subnet then hotkey (at most 64 per subnet).

17 fields in owned (each item)
netuidinteger · unit id

The deposit's subnet.

generationinteger · unit id · can be null

Opaque life id (the life's registration identifier), NOT a block height; use life_start_height for the first block. The subnet's life at the deposit's last change; null while that life is not known yet.

life_start_heightinteger · unit block · can be null

The first block of the life generation names (GET /subnets/generations' start_height): use it, never generation, for heights, ages and dates. Null exactly when generation is null (root without a life, no subnet), or transiently when this API cannot read the lives. Root's generation 0 starts at 0.

is_current_lifeboolean · can be null

Whether generation is the slot's current life (true) or an ended one, re-registered since (false). Null exactly when generation is null, or transiently when this API cannot read the lives. Root's generation 0 is current.

hotkeyobject

The deposit's hotkey (with netuid, its key): the credential a service bills. Holding its private key gives no authority over the deposit.

2 fields in hotkey
ss58string

The account, SS58 (prefix 42).

Format: SS58 address
hexstring

The same 32-byte account id, 0x + 64 lower-case hex (the public key).

Format: 32-byte hex: 0x and 64 hex digits
coldkeyobject

The owner now: the coldkey that opened it, or the new coldkey after a coldkey swap (which moves the deposit with no gamma event). Only the owner sets the spender and the cap, moves the balance and closes the deposit.

2 fields in coldkey
ss58string

The account, SS58 (prefix 42).

Format: SS58 address
hexstring

The same 32-byte account id, 0x + 64 lower-case hex (the public key).

Format: 32-byte hex: 0x and 64 hex digits
spenderobject

The one account that may spend it.

2 fields in spender
ss58string

The account, SS58 (prefix 42).

Format: SS58 address
hexstring

The same 32-byte account id, 0x + 64 lower-case hex (the public key).

Format: 32-byte hex: 0x and 64 hex digits
balance_gamma_raostring · unit gamma_rao (÷1e9)

The balance. A deposit at 0 stays until its owner closes it. In gamma rao (10^9 per gamma).

Format: whole number, as a string
daily_spend_cap_gamma_raostring · unit gamma_rao (÷1e9) · can be null

The most the spender may spend per 7,200 blocks (about a day); null = no cap. In gamma rao (10^9 per gamma).

Format: whole number, as a string
spendable_gamma_raostring · unit gamma_rao (÷1e9)

What the spender may spend now: the balance, or less under the cap (the cap's allowance refills by cap x blocks / 7,200, at most the cap). In gamma rao (10^9 per gamma).

Format: whole number, as a string
opened_heightinteger · unit block · can be null

The block of the current opening's first credit (a mint or a move in after a close, or the first ever); a hotkey's deposit can be closed and opened again, by another coldkey too. Null when no event of this subnet life opened it.

opened_timestring (date-time) · can be null

opened_height's time, RFC 3339 UTC; null with it.

Format: date and time, ISO 8601 in UTC
last_changed_heightinteger · unit block

The block of the deposit's last change.

minted_gamma_raostring · unit gamma_rao (÷1e9)

Gamma minted into it since opened_height (mints and emission mints). In gamma rao (10^9 per gamma).

Format: whole number, as a string
spent_gamma_raostring · unit gamma_rao (÷1e9)

Gamma spent from it since opened_height. In gamma rao (10^9 per gamma).

Format: whole number, as a string
moved_in_gamma_raostring · unit gamma_rao (÷1e9)

Gamma moved in from the owner's other deposits since opened_height (untested). In gamma rao (10^9 per gamma).

Format: whole number, as a string
moved_out_gamma_raostring · unit gamma_rao (÷1e9)

Gamma moved out to the owner's other deposits since opened_height (untested). balance = minted + moved_in - spent - moved_out. In gamma rao (10^9 per gamma).

Format: whole number, as a string
spendablearray of objects

Deposits whose spender is the account now, by subnet then hotkey.

17 fields in spendable (each item)
netuidinteger · unit id

The deposit's subnet.

generationinteger · unit id · can be null

Opaque life id (the life's registration identifier), NOT a block height; use life_start_height for the first block. The subnet's life at the deposit's last change; null while that life is not known yet.

life_start_heightinteger · unit block · can be null

The first block of the life generation names (GET /subnets/generations' start_height): use it, never generation, for heights, ages and dates. Null exactly when generation is null (root without a life, no subnet), or transiently when this API cannot read the lives. Root's generation 0 starts at 0.

is_current_lifeboolean · can be null

Whether generation is the slot's current life (true) or an ended one, re-registered since (false). Null exactly when generation is null, or transiently when this API cannot read the lives. Root's generation 0 is current.

hotkeyobject

The deposit's hotkey (with netuid, its key): the credential a service bills. Holding its private key gives no authority over the deposit.

2 fields in hotkey
ss58string

The account, SS58 (prefix 42).

Format: SS58 address
hexstring

The same 32-byte account id, 0x + 64 lower-case hex (the public key).

Format: 32-byte hex: 0x and 64 hex digits
coldkeyobject

The owner now: the coldkey that opened it, or the new coldkey after a coldkey swap (which moves the deposit with no gamma event). Only the owner sets the spender and the cap, moves the balance and closes the deposit.

2 fields in coldkey
ss58string

The account, SS58 (prefix 42).

Format: SS58 address
hexstring

The same 32-byte account id, 0x + 64 lower-case hex (the public key).

Format: 32-byte hex: 0x and 64 hex digits
spenderobject

The one account that may spend it.

2 fields in spender
ss58string

The account, SS58 (prefix 42).

Format: SS58 address
hexstring

The same 32-byte account id, 0x + 64 lower-case hex (the public key).

Format: 32-byte hex: 0x and 64 hex digits
balance_gamma_raostring · unit gamma_rao (÷1e9)

The balance. A deposit at 0 stays until its owner closes it. In gamma rao (10^9 per gamma).

Format: whole number, as a string
daily_spend_cap_gamma_raostring · unit gamma_rao (÷1e9) · can be null

The most the spender may spend per 7,200 blocks (about a day); null = no cap. In gamma rao (10^9 per gamma).

Format: whole number, as a string
spendable_gamma_raostring · unit gamma_rao (÷1e9)

What the spender may spend now: the balance, or less under the cap (the cap's allowance refills by cap x blocks / 7,200, at most the cap). In gamma rao (10^9 per gamma).

Format: whole number, as a string
opened_heightinteger · unit block · can be null

The block of the current opening's first credit (a mint or a move in after a close, or the first ever); a hotkey's deposit can be closed and opened again, by another coldkey too. Null when no event of this subnet life opened it.

opened_timestring (date-time) · can be null

opened_height's time, RFC 3339 UTC; null with it.

Format: date and time, ISO 8601 in UTC
last_changed_heightinteger · unit block

The block of the deposit's last change.

minted_gamma_raostring · unit gamma_rao (÷1e9)

Gamma minted into it since opened_height (mints and emission mints). In gamma rao (10^9 per gamma).

Format: whole number, as a string
spent_gamma_raostring · unit gamma_rao (÷1e9)

Gamma spent from it since opened_height. In gamma rao (10^9 per gamma).

Format: whole number, as a string
moved_in_gamma_raostring · unit gamma_rao (÷1e9)

Gamma moved in from the owner's other deposits since opened_height (untested). In gamma rao (10^9 per gamma).

Format: whole number, as a string
moved_out_gamma_raostring · unit gamma_rao (÷1e9)

Gamma moved out to the owner's other deposits since opened_height (untested). balance = minted + moved_in - spent - moved_out. In gamma rao (10^9 per gamma).

Format: whole number, as a string

Response headers

10 headers: ETag, Cache-Control, CDN-Cache-Control, X-BTAI-Stale, X-BTAI-Stale-As-Of, RateLimit-Policy, RateLimit, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
ETag

Strong validator of this answer. Send it back as If-None-Match: an unchanged answer is a 304 Not Modified without a body. A settled answer's validator leaves the chain head out, so it stays valid as the head moves.

Cache-Control

One of three classes: settled public, max-age=3600, stale-while-revalidate=86400 (pinned to a block that cannot move), slow public, max-age=300, stale-while-revalidate=600 (state that moves in minutes or days) or tip public, max-age=6, stale-while-revalidate=12 (follows the chain head); the label routes are cached until the next nightly copy (public, max-age=<seconds>, stale-while-revalidate=60). Never immutable. no-store on an earlier answer served because the data source failed (X-BTAI-Stale).

CDN-Cache-Control

The same class for shared caches (RFC 9213; browsers ignore it): settled 24 h, slow 300 s, tip 6 s, each with stale-while-revalidate and stale-if-error; no-store with X-BTAI-Stale.

X-BTAI-Stale

Present only when the data source failed to answer (it timed out or was unavailable) and an earlier answer to the same request is served instead of a 503 (stale if error, RFC 5861). Then if-error, with X-BTAI-Stale-As-Of, Age (its seconds since then) and Warning: 110 - "Response is Stale", and Cache-Control: no-store: the answer is never kept as fresh, and a later request reads again. Prices and quotes are never served this way.

X-BTAI-Stale-As-Of

With X-BTAI-Stale: when the earlier answer served was produced, an RFC 3339 UTC time (2026-10-21T12:00:00Z).

RateLimit-Policy

The tier's request quota of the current window (IETF draft), e.g. "tier";q=600.

RateLimit

Requests left in the current window and the seconds until it resets (IETF draft), e.g. "tier";r=597;t=42.

X-RateLimit-Limit

The tier's request quota of the current window.

X-RateLimit-Remaining

Requests left in the current window.

X-RateLimit-Reset

When the current window resets, Unix seconds.

Status codes

200 · 304 · 400 · 401 · 402 · 403 · 404 · 429 · 500 · 503

304 Not Modified: the If-None-Match validator still matches; no body.

Error codes

The codes this endpoint can return. Each links to what it means and what to do.

From the API's published specification, version 1.175.0.