GET /tokenBalances
Last updated
Last updated
This endpoint retrieves token balances and corresponding prices for a given wallet address in the format required by the natural language endpoint.
This API is designed for developers and traders building programmatic or UI flows that leverage Haiku's natural language intent functionality accessible via the API. It supports the process of preparing data for use in constructing intents. Use this API to:
Fetch wallet balances: Retrieve all token balances for a wallet in a pre-formatted structure.
Prepare for natural language intents: Provide structured wallet data for the API, simplifying intent creation.
Validate for quoting: Ensure the correct balances are used when preparing to quote a trade with the API.
Enable execution: Use this data to finalise and execute transactions via the API.
address
string
The wallet address for which the token balances are to be fetched.
Returns a JSON object containing
wallet_positions
object
Token balances, formatted for natural language intents
prices
object
Prices corresponding to each token in the wallet
Base URL: