get_pairs
Retrieve trading pairs from CSPR.trade DEX with real-time reserves and pricing data for informed trading decisions.
Instructions
List trading pairs on CSPR.trade with reserves and pricing data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (default 1) | |
| page_size | No | Items per page (default 10, max 250) | |
| order_by | No | ||
| order_direction | No | ||
| currency | No | Fiat currency code for pricing |
Implementation Reference
- The handler function that executes the logic for the 'get_pairs' tool by calling the client.getPairs method.
async (args) => { const result = await client.getPairs({ page: args.page, pageSize: args.page_size, orderBy: args.order_by, orderDirection: args.order_direction, currency: args.currency, }); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }] }; }, - packages/mcp/src/tools/market-data.ts:16-36 (registration)The registration block for the 'get_pairs' tool using the server.tool method.
server.tool( 'get_pairs', 'List trading pairs on CSPR.trade with reserves and pricing data', { page: z.number().optional().describe('Page number (default 1)'), page_size: z.number().optional().describe('Items per page (default 10, max 250)'), order_by: z.enum(['timestamp', 'reserve0', 'reserve1']).optional(), order_direction: z.enum(['asc', 'desc']).optional(), currency: z.string().optional().describe('Fiat currency code for pricing'), }, async (args) => { const result = await client.getPairs({ page: args.page, pageSize: args.page_size, orderBy: args.order_by, orderDirection: args.order_direction, currency: args.currency, }); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }] }; }, ); - The Zod input schema definition for the 'get_pairs' tool.
{ page: z.number().optional().describe('Page number (default 1)'), page_size: z.number().optional().describe('Items per page (default 10, max 250)'), order_by: z.enum(['timestamp', 'reserve0', 'reserve1']).optional(), order_direction: z.enum(['asc', 'desc']).optional(), currency: z.string().optional().describe('Fiat currency code for pricing'), },