get_balances
Retrieve token balances for any Solana wallet to verify holdings before trading. Free API call, no transaction execution.
Instructions
Get token balances for a wallet address via Jupiter Ultra API.
This function is FREE to call and does not execute any transactions. Use this to check wallet holdings before making trades.
Args: wallet_address: The wallet address to get balances for (optional, will use configured wallet if not provided)
Returns: Dictionary containing: - success: Boolean indicating if the request was successful - wallet_address: The wallet address that was queried - data: Array of token balances with mint addresses, amounts, and decimals - error: Error message if request failed
Example: >>> # Get balances for configured wallet >>> result = await api.get_balances() >>> if result["success"]: ... balances = result["data"] ... for balance in balances: ... print(f"Token: {balance['mint']}, Amount: {balance['amount']}") >>> >>> # Get balances for specific wallet >>> result = await api.get_balances(wallet_address="11111111111111111111111111111112")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_address | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||