@zhelvis/cmc

CoinMarketCap API

CoinMarketCap RESTful API typescript client generated from Postman collection

npm install @zhelvis/cmc
import { client, metadataV2 } from '@zhelvis/cmc';

client.setConfig({
baseUrl: 'https://pro-api.coinmarketcap.com',
headers: {
'x-cmc_pro_api_key': '<your-api-key>',
},
})

await metadataV2({
query: {
id: "1"
}
});

This project uses Bun runtime for development tasks. Linting and formatting is done using Biome. Building is done using Rollup. Docs are generated using TypeDoc.

# Install dependencies
bun install

# Run linter and formatter
bun run check

# Download fresh postman collection and generate typescript client
bun run generate

# Create docs based on generated code
bun run docs

# Create production build
bun run build