Queries

lease

A subnet lease by id (beneficiary, emissions share, end block, netuid, cost), or None.

View as Markdown

emissions_share is a percentage from 0 to 100; end_block is None for a perpetual lease.

Category: Leases & crowdloans

Parameters

ParameterTypeDescription
lease_idintegerId of the subnet lease to look up.

CLI

btcli query lease --lease-id <integer> --json

Python

Namespace method (autocomplete, signature help):

import bittensor as bt

sub = bt.Subtensor()
result = sub.leasing.lease(lease_id=1)

Or dispatch by name, as an agent would:

result = sub.read("lease", lease_id=1)

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.