get_portfolio
Read token holdings for a managed GDEX wallet on one chain, returning raw and decimal balances, price, native value, and P&L per token. Requires accountRef session.
Instructions
Token holdings of the managed GDEX wallet on one chain (/v1/portfolio): exact raw and decimal balances, price, native value and P&L per token. Needs the session (accountRef). Errors instead of returning an empty portfolio when the read fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Encrypted session data, instead of sessionPrivateKey + apiKey | |
| chain | Yes | Chain to read (holdings are per chain) | |
| apiKey | No | GDEX API key (with sessionPrivateKey) | |
| accountRef | No | Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat | |
| walletAddress | No | Control wallet address (the GDEX userId), not the managed trading wallet | |
| sessionPrivateKey | No | Session private key from sign-in (with apiKey) |