jupiter_portfolio
Retrieve a wallet's complete portfolio across Jupiter DeFi services including swaps, lending, DCA, limit orders, perps, and prediction markets.
Instructions
Get full portfolio for a wallet — all Jupiter positions across swaps, lending, DCA, limit orders, perps, and prediction markets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | Wallet address |
Implementation Reference
- src/tools/portfolio.ts:12-15 (handler)The async handler function that calls client.portfolio(args.wallet) to fetch portfolio data and returns it as JSON string.
async (args) => { const result = await client.portfolio(args.wallet); return JSON.stringify(result, null, 2); }, - src/tools/portfolio.ts:10-10 (schema)Zod schema for the tool's input: wallet (string) describing the wallet address to query.
wallet: z.string().describe("Wallet address"), - src/tools/portfolio.ts:5-16 (registration)registerPortfolioTools function that registers the tool with name 'jupiter_portfolio', a description, input schema, and handler callback.
export function registerPortfolioTools(register: ToolRegistrar, client: JupiterClient) { register( "jupiter_portfolio", "Get full portfolio for a wallet — all Jupiter positions across swaps, lending, DCA, limit orders, perps, and prediction markets.", { wallet: z.string().describe("Wallet address"), }, async (args) => { const result = await client.portfolio(args.wallet); return JSON.stringify(result, null, 2); }, ); - src/index.ts:69-69 (registration)Top-level call to registerPortfolioTools(register, client) in the main entry point to wire up the tool.
registerPortfolioTools(register, client); - src/client.ts:233-237 (helper)The JupiterClient.portfolio() method that makes the HTTP GET request to /portfolio/v1/positions with the wallet param.
async portfolio(wallet: string) { return this.request("/portfolio/v1/positions", { params: { wallet }, }); }