API referenceSubnets
Subnet Stake Quote
Last updated
Fetch a read-only constant-product stake/unstake slippage quote for one subnet: the expected alpha/TAO out, spot vs effective price (TAO per alpha), and price-impact percent for a swap of ?amount= in ?direction=stake|unstake (default stake), computed live from the subnet's economics-tier AMM pool reserves (tao_in_pool_tao, alpha_in_pool). Pure math — no chain write, no custody — mirroring the chain's own constant-product swap and its InsufficientLiquidity guard: an amount over 1000× the relevant reserve is rejected with 422. The root subnet (netuid 0) has no AMM and returns a 1:1, zero-impact quote.
Path Parameters
netuid*integer
Range
0 <= valueQuery Parameters
amount?number
Range
0 < valuedirection?string
Value in
- "stake"
- "unstake"
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/subnets/0/stake-quote"{ "data": { "alpha_in_pool": 0.5, "amount": 0.5, "direction": "stake", "effective_price_tao": 0.5, "expected_out": 0.5, "expected_out_unit": "alpha", "is_root": false, "netuid": 7, "price_impact_pct": 0.5, "schema_version": 1, "spot_price_tao": 0.5, "tao_in_pool_tao": 0.5 }, "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}