SDKs & tools
TypeScript SDK
The official TypeScript/JavaScript SDK wraps the CoinMarketCap Pro API with full type definitions, automatic retries, and a namespace API grouped by endpoint category.
- npm:
@coinmarketcap/sdk - GitHub: OpenCMC/coinmarketcap-api-typescript
- Requires: Node.js 18+ (TypeScript 5.0+ recommended)
Get started
-
Install the package
CodeOr with Yarn / pnpm:
Code -
Create a client
Set your API key from the Developer Portal. For keyless endpoints, use
environment: 'public'.Code -
Call an endpoint
Endpoints are grouped under
cmc.api:CodeOr throw on error:
Code -
Handle errors
The SDK returns typed error classes (or throws when
throwOnError: true):Code
Public (keyless) mode
Code
See the Keyless Public API for available endpoints without a key.
Next steps
- Get Started with an API Key if you have not set up authentication yet
- Choose an endpoint to find the right API family
- Full README and API reference on GitHub