Queries
quote-unstake
Simulate unstaking `amount_alpha` alpha from a subnet: TAO out, fee, and slippage.
Category: Prices & swaps
Parameters
| Parameter | Type | Description |
|---|---|---|
netuid | integer | Subnet to simulate unstaking from. |
amount_alpha | number | Alpha amount to simulate unstaking. |
CLI
btcli query quote-unstake --netuid <integer> --amount-alpha <number> --jsonPython
Namespace method (autocomplete, signature help):
import bittensor as bt
sub = bt.Subtensor()
result = sub.prices.quote_unstake(netuid=1, amount_alpha=1.0)Or dispatch by name, as an agent would:
result = sub.read("quote_unstake", netuid=1, amount_alpha=1.0)Async is the same surface awaited: async with bt.Subtensor() as client:.
On-chain implementation
- Runtime API
SwapRuntimeApi.sim_swap_alpha_for_tao
Every file is browsable under /code exactly as built into the runtime.