exchangeInfo
Access detailed metadata for cryptocurrency exchanges, including IDs, slugs, and auxiliary data, through the CoinMarketCap MCP API. Simplify exchange information retrieval for informed decision-making.
Instructions
Returns metadata for one or more exchanges.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aux | No | ||
| id | No | ||
| slug | No |
Implementation Reference
- index.js:461-466 (handler)The handler function executes the tool logic by calling makeApiRequest to the CoinMarketCap API endpoint '/v1/exchange/info' with the provided parameters, formatting the response, and wrapping it in handleEndpoint for error handling.async (params) => { return handleEndpoint(async () => { const data = await makeApiRequest(apiKey, '/v1/exchange/info', params) return formatResponse(data) }) }
- index.js:457-459 (schema)Zod schema defining optional string parameters: id, slug, and aux for querying exchange metadata.id: z.string().optional(), slug: z.string().optional(), aux: z.string().optional()
- index.js:454-467 (registration)The server.tool registration for 'exchangeInfo', including description, input schema, and inline handler function.server.tool("exchangeInfo", "Returns metadata for one or more exchanges.", { id: z.string().optional(), slug: z.string().optional(), aux: z.string().optional() }, async (params) => { return handleEndpoint(async () => { const data = await makeApiRequest(apiKey, '/v1/exchange/info', params) return formatResponse(data) }) } )