Transactions
execute-batched-orders
Relay a bounded order batch through the atomic subnet netting engine.
| Signer | Origin | Pallet | Wraps |
|---|---|---|---|
coldkey | signed account (pallet role may apply) | LimitOrders | LimitOrders.execute_batched_orders |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
orders | array | yes | Complete SignedOrder objects. |
should_fail | boolean | no | Revert the batch if any order fails. |
netuid | integer | no | Subnet shared by all orders in the atomic netted batch. |
Address parameters (--hotkey, --coldkey, --dest, ...) accept a raw ss58
address, an address-book or proxy-book name, or a local wallet/hotkey name.
CLI
Preview with --dry-run (shows fee, effects, and policy result without
submitting), then submit:
btcli tx execute-batched-orders \
--orders <a,b,c> --dry-run
btcli tx execute-batched-orders \
--orders <a,b,c> -w my_coldkeyPython
import bittensor as bt
from bittensor.wallet import Wallet
wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.ExecuteBatchedOrders(orders=[...])
sub = bt.Subtensor()
plan = sub.plan(intent, wallet) # fee, effects, policy — no submission
result = sub.execute(intent, wallet)
if not result.success:
print(result.error.code, result.error.remediation)(bt.Subtensor is also the async client — async with bt.Subtensor() as client:
— see The client.) Or build the intent by op name, as
an agent would:
result = sub.execute_tool("execute_batched_orders", {...}, wallet)On-chain implementation
LimitOrders.execute_batched_orders — pallets/limit-orders/src/lib.rs#L668:
#[pallet::call_index(1)]
#[pallet::weight(Pallet::<T>::execute_batched_orders_weight(orders))]
pub fn execute_batched_orders(
origin: OriginFor<T>,
netuid: NetUid,
orders: BoundedVec<SignedOrder<T::AccountId>, T::MaxOrdersPerBatch>,
) -> DispatchResult {
let relayer = ensure_signed(origin)?;
ensure!(
LimitOrdersEnabled::<T>::get(),
Error::<T>::LimitOrdersDisabled
);
Self::check_authorized_batch_bound(&orders)?;
Self::do_execute_batched_orders(netuid, orders, relayer)
}Delegates to check_authorized_batch_bound.
Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).