Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.14 KB

File metadata and controls

48 lines (31 loc) · 1.14 KB
title quote-stake
description Simulate staking `amount_tao` TAO into a subnet: alpha out, fee, and slippage.

{/* GENERATED by scripts/generate.py from the SDK registries — do not edit. */}

Use this to compute a safe limit_price_rao for the add_stake_limit intent.

Category: Prices & swaps

Parameters

Parameter Type Description
netuid integer Subnet to simulate staking into.
amount_tao number TAO amount to simulate staking.

CLI

btcli query quote-stake --netuid <integer> --amount-tao <number> --json

Python

Namespace method (autocomplete, signature help):

import bittensor as bt

sub = bt.Subtensor()
result = sub.prices.quote_stake(netuid=1, amount_tao=1.0)

Or dispatch by name, as an agent would:

result = sub.read("quote_stake", netuid=1, amount_tao=1.0)

Async is the same surface awaited: async with bt.Subtensor() as client:.

On-chain implementation

Every file is browsable under /code exactly as built into the runtime.