Skip to main content
Glama
openSVM
by openSVM

get_pairs_by_token_addresses

Retrieve DEX trading pairs using token addresses to analyze liquidity and market data across multiple blockchains.

Instructions

Get one or multiple pairs by token address (max 30)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenAddressesYesComma-separated token addresses

Implementation Reference

  • The core handler function in DexScreenerService that fetches pairs data from the DexScreener API endpoint `/latest/dex/tokens/${tokenAddresses}` using the internal fetch method with appropriate rate limiting.
    async getPairsByTokenAddresses({ tokenAddresses }: TokenParams): Promise<DexResponse> { return this.fetch<DexResponse>( `/latest/dex/tokens/${tokenAddresses}`, dexRateLimiter ); }
  • MCP tool registration schema defining the input schema for get_pairs_by_token_addresses, specifying tokenAddresses as a required string parameter.
    get_pairs_by_token_addresses: { description: 'Get one or multiple pairs by token address (max 30)', inputSchema: { type: 'object', properties: { tokenAddresses: { type: 'string', description: 'Comma-separated token addresses', }, }, required: ['tokenAddresses'], }, },
  • src/index.ts:331-335 (registration)
    Registration and dispatch logic in the MCP CallToolRequest handler that casts arguments and calls the DexScreenerService.getPairsByTokenAddresses method.
    case 'get_pairs_by_token_addresses': { const args = request.params.arguments as { tokenAddresses: string }; result = await this.dexService.getPairsByTokenAddresses(args); break; }
  • TypeScript type definition for TokenParams used as input type in the handler function, matching the MCP input schema.
    export type TokenParams = { tokenAddresses: string; // Comma-separated addresses };

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/openSVM/dexscreener-mcp-server'

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