Get Pi wallet balance
get_wallet_balanceCheck a Pi wallet address's current Pi and custom-token balances on Pi Mainnet or Testnet. Reads public ledger data with no credentials, distinguishing absent accounts from zero balances.
Instructions
Read the current Pi and custom-token balances of a Pi wallet address. Call this whenever you need to know how much Pi an address holds, whether it holds a particular token, or whether the account exists on-chain at all. Reads public ledger data only — it cannot move funds and needs no credentials. An address that has never been funded on this chain is not an account there: the call returns a not-found error rather than a zero balance, so 'absent' and 'holds nothing' stay distinguishable. This server reads Pi Testnet, and every result repeats that in its "network" field — always report which chain a figure came from. Pi Mainnet and Pi Testnet are separate ledgers sharing one address format, and the same address can hold different balances on each, so a result from the wrong chain looks entirely normal. Testnet Pi has no monetary value: never present a testnet balance as real holdings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Pi wallet address (a Stellar public key): exactly 56 upper-case characters, starting with G, the rest base32 — A-Z and 2-7 only, never 0, 1, 8 or 9. Example: GATQBZLIAUVMND2OCPOKWGPUCNXIGKMNUU7E67YQI2MODSMCMLXBAIJA — that is a format sample, not a default. Pass the address you were actually given: a valid address that is not the intended one returns someone else's balance, not an error. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | Yes | ||
| balances | Yes | ||
| sequence | Yes | ||
| account_id | Yes | ||
| subentry_count | Yes | ||
| last_modified_ledger | Yes |