CoinGecko
Created 5 months ago
Coingecko TypeScript API Library for server-side access to the Coingecko REST API.
development
documentation
public
What is CoinGecko?
Official [CoinGecko API](https://www.coingecko.com/en/api) MCP Server for Crypto Price & Market Data, across 200+ Blockchain Networks and 8M+ Tokens.
Documentation
Installation
npm install @coingecko/coingecko-typescript
Usage
The full API of this library can be found in api.md.
import Coingecko from '@coingecko/coingecko-typescript';
const client = new Coingecko({
proAPIKey: process.env['COINGECKO_PRO_API_KEY'], // demoAPIKey: process.env['COINGECKO_DEMO_API_KEY'], // Optional, for Demo API access
environment: 'pro', // 'demo' to initialize the client with Demo API access
});
async function main() {
const price = await client.simple.price.get({ vs_currencies: 'usd', ids: 'bitcoin' });
console.log(price);
}
main();
Request & Response types
This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
import Coingecko from '@coingecko/coingecko-typescript';
const client = new Coingecko({
proAPIKey: process.env['COINGECKO_PRO_API_KEY'], // demoAPIKey: process.env['COINGECKO_DEMO_API_KEY'], // Optional, for Demo API access
environment: 'pro', // 'demo' to initialize the client with Demo API access
});
const params: Coingecko.Simple.PriceGetParams = { vs_currencies: 'usd', ids: 'bitcoin' };
const price: Coingecko.Simple.PriceGetResponse = await client.simple.price.get(params);
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
Server Config
{
"mcpServers": {
"coingecko-server": {
"command": "npx",
"args": [
"coingecko"
]
}
}
}
Links & Status
Project Info
Hosted
Featured
Created At:
Jul 02, 2025
Updated At:
Aug 07, 2025
Author:
CoinGecko
Category:
official
License:
MIT
Tags:
development
documentation
public