Skip to main content
Glama

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
NameRequiredDescriptionDefault
pageNoPage number (default 1)
page_sizeNoItems per page (default 10, max 250)
order_byNo
order_directionNo
currencyNoFiat 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) }] };
    },
  • 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'),
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/make-software/cspr-trade-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server