Skip to main content
Glama

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
NameRequiredDescriptionDefault
auxNo
convert_idNo
limitNo
sortNo
sort_dirNo
startNo
typeNo

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)
        })
      }
    )
  • 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)
      })
    }
  • 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()
    },

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/shinzo-labs/coinmarketcap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server