Get QUAI <-> Qi Conversion Rate
get_conversion_rateRetrieve the current on-chain conversion rate between QUAI and Qi for a chosen amount, direction, and zone. Read-only quote that shows the rate before you send a transaction.
Instructions
Quote a conversion between Quai's two native ledgers: QUAI (account-based, EVM) and Qi (UTXO-based, like Bitcoin -- this is Quai's own built-in swap, not a third-party DEX. Returns the current on-chain rate for converting a given amount in one direction, as of the latest block in the given zone. This is read-only and doesn't move anything -- to actually convert QUAI into Qi, send_transaction to a Qi-ledger address (it detects this automatically and shows the same estimate in its preview). Converting Qi into QUAI is not supported by this server yet: Qi is UTXO-based and needs a different kind of wallet (one that scans and manages unspent outputs) than the single-key wallets this server currently stores.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zone | Yes | The zone to get the rate in -- rates can differ slightly by zone. | |
| amount | Yes | Amount to convert, in the source currency's human units (e.g. "10" QUAI, or "5" Qi). | |
| network | No | Which Quai network to query: "mainnet" or "testnet" (the Orchard testnet). Defaults to mainnet. | mainnet |
| direction | Yes | Which way to convert. Only quai_to_qi is currently executable via send_transaction; qi_to_quai is quote-only here. |