Skip to main content
Glama
openSVM
by openSVM

get_pairs_by_chain_and_address

Retrieve DEX trading pair data by specifying blockchain and contract address to analyze liquidity, prices, and market activity.

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 core handler function in DexScreenerService that performs the API fetch for pairs by chain ID and pair address, including rate limiting.
    async getPairsByChainAndAddress({ chainId, pairId }: PairParams): Promise<DexResponse> { return this.fetch<DexResponse>( `/latest/dex/pairs/${chainId}/${pairId}`, dexRateLimiter ); }
  • Input schema for the tool defined in MCP server capabilities, requiring chainId and pairId strings.
    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)
    Registration and dispatching logic in the MCP tools/call handler switch statement, calling the service method with parsed arguments.
    case 'get_pairs_by_chain_and_address': { const args = request.params.arguments as { chainId: string; pairId: string }; result = await this.dexService.getPairsByChainAndAddress(args); break; }
  • Duplicate input schema and tool metadata returned by the listTools MCP 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'], }, },

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