remove_stake_full_limit
Call v290 â current #103Removes all stake from a subnet with optional price limit.
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
The Big Picture
Combines the convenience of unstake_all with the protection of limit orders. You don't need to know your exact Alpha balance - the call handles that. But you do set a minimum acceptable TAO return, protecting you from unstaking at unfavorable rates. Best of both worlds for exiting large positions.
Why This Matters
When exiting a large position, you want two things: complete exit (no dust left behind) and price protection (not getting slaughtered on the conversion). This call provides both. Set your floor, exit entirely, or not at all.
Example Scenario
You have a large Alpha position on subnet 7, exact amount unknown. You want at least 0.90 TAO per Alpha. Call remove_stake_full_limit(hotkey, netuid=7, limit_price=0.90). If Alpha is 0.92, your entire position converts and you receive TAO. If Alpha dropped to 0.85, transaction fails - position unchanged.
Common Questions
- What if I don't care about the price?
- Use unstake_all instead - simpler call, no limit logic. Or set limit_price=0 to effectively disable the floor.
- Does 'full' mean all my stake or all on this subnet?
- All stake on the specified subnet for the given hotkey. Other subnets are unaffected. This is subnet-specific, not account-wide.
- Can this partially fill?
- No - it's full or nothing. Either your entire position unstakes at the limit price or better, or the transaction fails. There's no partial exit with this call.
Use Cases
- Exit entire position with guaranteed minimum TAO return
- Close out large positions with slippage protection
- Automated portfolio exits with price floors
- Protect against Alpha depreciation during full unstake
From Chain Metadata
Removes all stake from a hotkey on a subnet with a price limit. This extrinsic allows to specify the limit price for alpha token at which or better (higher) the staking should execute. Without limit_price it remove all the stake similar to `remove_stake` extrinsic
Input Parameters
Permissions
Permission data inferred from metadata. May be incomplete.
Requirements
- Has stake on the subnet
- Price limit met (if specified)
- Coldkey associated with hotkey
Effects
Events Emitted
Storage Modified
Postconditions
- All stake removed from subnet
- Coldkey receives TAO at limit price or better
Side Effects
- Similar to unstake_all but with price protection
- Transaction fails if price below limit
Possible Errors
Code Examples
import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";
const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });
// Build remove_stake_full_limit call
const hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const netuid = 1;
const limit_price = 0 as any /* Option */;
const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("remove_stake_full_limit")](
hotkey,
netuid,
limit_price
);On-Chain Activity
Significant regular use
#34 most used call
50â80% of submissions succeed
As of block 7,429,232
Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 103
- First Version
- v290
- Current Version
- v393