Skip to main content
Glama
openSVM
by openSVM

get_pairs_by_chain_and_address

Retrieve decentralized exchange (DEX) pair data using chain ID and pair address for real-time market insights and token profiles across multiple blockchains.

Instructions

Get one or multiple pairs by chain and pair address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainIdYesChain ID (e.g., "solana")
pairIdYesPair address

Implementation Reference

  • The handler function that executes the tool logic by fetching pair data from the DexScreener API endpoint using the provided chainId and pairId parameters.
    async getPairsByChainAndAddress({ chainId, pairId }: PairParams): Promise<DexResponse> { return this.fetch<DexResponse>( `/latest/dex/pairs/${chainId}/${pairId}`, dexRateLimiter ); }
  • Type definition for the input parameters (PairParams) used by the getPairsByChainAndAddress handler.
    export type PairParams = { chainId: string; pairId: string; };
  • src/index.ts:138-154 (registration)
    Tool registration in MCP server capabilities, including description and input schema.
    get_pairs_by_chain_and_address: { description: 'Get one or multiple pairs by chain and pair address', inputSchema: { type: 'object', properties: { chainId: { type: 'string', description: 'Chain ID (e.g., "solana")', }, pairId: { type: 'string', description: 'Pair address', }, }, required: ['chainId', 'pairId'], }, },
  • src/index.ts:325-329 (registration)
    Dispatch logic in the CallTool handler that routes the tool call to the DexScreenerService method.
    case 'get_pairs_by_chain_and_address': { const args = request.params.arguments as { chainId: string; pairId: string }; result = await this.dexService.getPairsByChainAndAddress(args); break; }
  • Tool schema returned by the ListTools handler.
    name: 'get_pairs_by_chain_and_address', description: 'Get one or multiple pairs by chain and pair address', inputSchema: { type: 'object', properties: { chainId: { type: 'string', description: 'Chain ID (e.g., "solana")', }, pairId: { type: 'string', description: 'Pair address', }, }, required: ['chainId', 'pairId'], }, },

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