jupiter_price
Get current USD prices for Solana tokens by passing comma-separated mint addresses. Optionally include confidence, depth, and last swap time.
Instructions
Get current USD prices for one or more Solana tokens. Pass mint addresses comma-separated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mints | Yes | Comma-separated mint addresses | |
| showExtraInfo | No | Include confidence, depth, and last swap time |
Implementation Reference
- src/tools/price.ts:5-18 (handler)The 'registerPriceTools' function registers the 'jupiter_price' tool with the MCP server. The handler (lines 13-17) splits comma-separated mint addresses and calls `client.price()` to fetch USD prices from Jupiter API.
export function registerPriceTools(register: ToolRegistrar, client: JupiterClient) { register( "jupiter_price", "Get current USD prices for one or more Solana tokens. Pass mint addresses comma-separated.", { mints: z.string().describe("Comma-separated mint addresses"), showExtraInfo: z.boolean().optional().describe("Include confidence, depth, and last swap time"), }, async (args) => { const ids = args.mints.split(",").map((s: string) => s.trim()); const result = await client.price(ids, args.showExtraInfo); return JSON.stringify(result, null, 2); }, ); - src/tools/price.ts:9-12 (schema)Zod schema for 'jupiter_price': `mints` (required string, comma-separated addresses) and `showExtraInfo` (optional boolean for confidence/depth/swap time).
{ mints: z.string().describe("Comma-separated mint addresses"), showExtraInfo: z.boolean().optional().describe("Include confidence, depth, and last swap time"), }, - src/index.ts:63-69 (registration)The 'jupiter_price' tool is registered by calling `registerPriceTools(register, client)` in the main entry point.
registerPriceTools(register, client); registerLendTools(register, client); registerTriggerTools(register, client); registerRecurringTools(register, client); registerPredictionTools(register, client); registerPerpsTools(register, client); registerPortfolioTools(register, client); - src/client.ts:109-116 (helper)The `price()` method on JupiterClient sends a GET request to `/price/v3` with comma-joined mint IDs and optional `showExtraInfo` parameter.
async price(ids: string[], showExtraInfo?: boolean) { return this.request("/price/v3", { params: { ids: ids.join(","), showExtraInfo: showExtraInfo ? "true" : undefined, }, }); }