Stellar (Soroban) API
Read a Stellar account's XLM and Stellar Asset Contract balances
Returns the balance of a Stellar account, native XLM plus any Stellar Asset Contract (SAC) tokens, with USD valuations from Ankr's pricing service.
Analogous to ankr_getAccountBalance with Stellar conventions: walletAddress is a Strkey address (G…), tokens carry tokenType: "SAC", and balances come back both raw and normalized so you never divide by decimals yourself.
Stellar is served by this namespace only. The ankr_* methods reject both stellar and stellar_soroban as a blockchain value.
post/?stellar_getAccountBalance
Request
- Base URLhttps://rpc.ankr.com/multichain/569ca1f392f7d3d0bb1073a1173ecb649af1d9249231fe59fa95db19d5ae41fe
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"id": 1,
"jsonrpc": "2.0",
"method": "stellar_getAccountBalance",
"params": {
"blockchain": "stellar_soroban",
"walletAddress": "GBEBCRCJ5VX7GERSGJ5XGJX7K2CHNVQB67K2KGCX7RFGMCBIIZQ5E4GY"
}
}Response
Success. JSON-RPC result contains the USD total, the asset list and the indexer sync status. JSON-RPC errors are returned with HTTP 200; check the response body for an error key.
Changes
No recorded changes to this operation across all 1 revision of this API.