exchangeAssets
Retrieve the asset holdings or token balances of a cryptocurrency exchange by specifying its CoinMarketCap ID or slug.
Instructions
Returns the assets/token holdings of an exchange.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| slug | No |
Implementation Reference
- index.js:439-451 (registration)The tool 'exchangeAssets' is registered via server.tool() with a description, parameter schema (id and slug as optional strings), and a handler that makes an API request to '/v1/exchange/assets' and formats the response.
server.tool("exchangeAssets", "Returns the assets/token holdings of an exchange.", { id: z.string().optional(), slug: z.string().optional() }, async (params) => { return handleEndpoint(async () => { const data = await makeApiRequest(apiKey, '/v1/exchange/assets', params) return formatResponse(data) }) } ) - index.js:445-450 (handler)The handler function for exchangeAssets calls handleEndpoint which wraps an async callback that makes an API request to '/v1/exchange/assets' with the provided parameters and formats the response.
async (params) => { return handleEndpoint(async () => { const data = await makeApiRequest(apiKey, '/v1/exchange/assets', params) return formatResponse(data) }) } - index.js:441-444 (schema)The input schema for exchangeAssets accepts 'id' and 'slug' as optional string parameters.
{ id: z.string().optional(), slug: z.string().optional() },