Skip to main content
Glama
openSVM
by openSVM

get_pairs_by_token_addresses

Retrieve decentralized exchange (DEX) pairs by providing token addresses as input. Use this tool to access real-time DEX pair data across multiple blockchains with up to 30 token addresses in a single query.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenAddressesYesComma-separated token addresses

Implementation Reference

  • The main handler function that fetches pairs data from DexScreener API endpoint '/latest/dex/tokens/{tokenAddresses}' using the internal fetch method with rate limiting.
    async getPairsByTokenAddresses({ tokenAddresses }: TokenParams): Promise<DexResponse> { return this.fetch<DexResponse>( `/latest/dex/tokens/${tokenAddresses}`, dexRateLimiter ); }
  • TypeScript type definition for the tool's input parameters, specifying tokenAddresses as a comma-separated string.
    export type TokenParams = { tokenAddresses: string; // Comma-separated addresses };
  • MCP tool input schema definition in the server capabilities, matching the TokenParams type.
    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 dispatching logic in the CallToolRequest handler switch statement, casting arguments and calling the service method.
    case 'get_pairs_by_token_addresses': { const args = request.params.arguments as { tokenAddresses: string }; result = await this.dexService.getPairsByTokenAddresses(args); break; }

Other Tools

Related Tools

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