dexListingsLatest
Fetch a paginated list of decentralised cryptocurrency exchanges with aggregated market data, including volume and market share, sorted by user-defined parameters.
Instructions
Returns a paginated list of all decentralised cryptocurrency exchanges including the latest aggregate market data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aux | No | ||
| convert_id | No | ||
| limit | No | ||
| sort | No | ||
| sort_dir | No | ||
| start | No | ||
| type | No |
Implementation Reference
- index.js:276-293 (registration)Full registration of the dexListingsLatest tool via server.tool(), including inline description, input schema validation with Zod, and the handler function.server.tool("dexListingsLatest", "Returns a paginated list of all decentralised cryptocurrency exchanges including the latest aggregate market data.", { start: z.string().optional(), limit: z.string().optional(), sort: z.enum(['name', 'volume_24h', 'market_share', 'num_markets']).optional(), sort_dir: z.enum(['desc', 'asc']).optional(), type: z.enum(['all', 'orderbook', 'swap', 'aggregator']).optional(), aux: z.string().optional(), convert_id: z.string().optional() }, async (params) => { return handleEndpoint(async () => { const data = await makeApiRequest(apiKey, '/v4/dex/listings/quotes', params) return formatResponse(data) }) } )
- index.js:287-292 (handler)The handler executes the tool logic: invokes handleEndpoint which calls makeApiRequest to the CMC API endpoint '/v4/dex/listings/quotes' with input params and apiKey, then formats the data with formatResponse.async (params) => { return handleEndpoint(async () => { const data = await makeApiRequest(apiKey, '/v4/dex/listings/quotes', params) return formatResponse(data) }) }
- index.js:278-286 (schema)Zod schema defining optional input parameters for pagination (start, limit), sorting (sort, sort_dir), filtering (type), and additional options (aux, convert_id).{ start: z.string().optional(), limit: z.string().optional(), sort: z.enum(['name', 'volume_24h', 'market_share', 'num_markets']).optional(), sort_dir: z.enum(['desc', 'asc']).optional(), type: z.enum(['all', 'orderbook', 'swap', 'aggregator']).optional(), aux: z.string().optional(), convert_id: z.string().optional() },