Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.4.0"
".": "2.5.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 81
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/coingecko%2Fcoingecko-9782d0fc256ca80aa3bb4c14cb3b3944b0076c5cea6046563c8a5979adc8981d.yml
openapi_spec_hash: dcb61d2acfd79e5b906fd191f6b512bb
config_hash: 7710c0bb2c0cea0ec5a44596f81188a6
configured_endpoints: 84
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/coingecko%2Fcoingecko-a23494dedfc230f769076f4022de83a327d642db68ceadedf998921c66ff9310.yml
openapi_spec_hash: 0bcc6962d4ee8f39880019986e87e433
config_hash: f101f417dba7f9352f7573639dd5938f
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 2.5.0 (2025-12-18)

Full Changelog: [v2.4.0...v2.5.0](https://github.com/coingecko/coingecko-typescript/compare/v2.4.0...v2.5.0)

### Features

* **api:** api update ([d24d42a](https://github.com/coingecko/coingecko-typescript/commit/d24d42ab977f88ad0b78a69a5723c34f7bbb8873))
* **api:** manual updates ([25a7b6e](https://github.com/coingecko/coingecko-typescript/commit/25a7b6ed66a83e167cf43b2df320cf12c7b41298))

## 2.4.0 (2025-12-18)

Full Changelog: [v2.3.0...v2.4.0](https://github.com/coingecko/coingecko-typescript/compare/v2.3.0...v2.4.0)
Expand Down
14 changes: 14 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,16 @@ Methods:

- <code title="get /onchain/networks/{network}/tokens/{token_address}/trades">client.onchain.networks.tokens.trades.<a href="./src/resources/onchain/networks/tokens/trades.ts">get</a>(tokenAddress, { ...params }) -> TradeGetResponse</code>

#### TopTraders

Types:

- <code><a href="./src/resources/onchain/networks/tokens/top-traders.ts">TopTraderGetResponse</a></code>

Methods:

- <code title="get /onchain/networks/{network_id}/tokens/{token_address}/top_traders">client.onchain.networks.tokens.topTraders.<a href="./src/resources/onchain/networks/tokens/top-traders.ts">get</a>(tokenAddress, { ...params }) -> TopTraderGetResponse</code>

## Pools

### Megafilter
Expand Down Expand Up @@ -594,11 +604,15 @@ Types:

- <code><a href="./src/resources/public-treasury.ts">PublicTreasuryGetCoinIDResponse</a></code>
- <code><a href="./src/resources/public-treasury.ts">PublicTreasuryGetEntityIDResponse</a></code>
- <code><a href="./src/resources/public-treasury.ts">PublicTreasuryGetHoldingChartResponse</a></code>
- <code><a href="./src/resources/public-treasury.ts">PublicTreasuryGetTransactionHistoryResponse</a></code>

Methods:

- <code title="get /{entity}/public_treasury/{coin_id}">client.publicTreasury.<a href="./src/resources/public-treasury.ts">getCoinID</a>(coinID, { ...params }) -> PublicTreasuryGetCoinIDResponse</code>
- <code title="get /public_treasury/{entity_id}">client.publicTreasury.<a href="./src/resources/public-treasury.ts">getEntityID</a>(entityID) -> PublicTreasuryGetEntityIDResponse</code>
- <code title="get /public_treasury/{entity_id}/{coin_id}/holding_chart">client.publicTreasury.<a href="./src/resources/public-treasury.ts">getHoldingChart</a>(coinID, { ...params }) -> PublicTreasuryGetHoldingChartResponse</code>
- <code title="get /public_treasury/{entity_id}/transaction_history">client.publicTreasury.<a href="./src/resources/public-treasury.ts">getTransactionHistory</a>(entityID, { ...params }) -> PublicTreasuryGetTransactionHistoryResponse</code>

# Search

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coingecko/coingecko-typescript",
"version": "2.4.0",
"version": "2.5.0",
"description": "The official TypeScript library for the Coingecko API",
"author": "Coingecko <eason.lim@coingecko.com>",
"types": "dist/index.d.ts",
Expand Down
9 changes: 9 additions & 0 deletions packages/mcp-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ The following tools are available in this MCP server.

- `get_tokens_networks_onchain_trades` (`read`): This endpoint allows you to **query the last 300 trades in the past 24 hours, across all pools, based on the provided token contract address on a network**

### Resource `onchain.networks.tokens.top_traders`:

- `get_tokens_networks_onchain_top_traders` (`read`): This endpoint allows you to **query top token traders based on the provided token contract address on a network**

### Resource `onchain.pools.megafilter`:

- `get_pools_onchain_megafilter` (`read`): This endpoint allows you to **query pools based on various filters across all networks on GeckoTerminal**
Expand All @@ -392,6 +396,11 @@ The following tools are available in this MCP server.

- `get_addresses_networks_simple_onchain_token_price` (`read`): This endpoint allows you to **get token price based on the provided token contract address on a network**

### Resource `public_treasury`:

- `get_holding_chart_public_treasury` (`read`): This endpoint allows you to **query historical cryptocurrency holdings chart of public companies & governments** by Entity ID and Coin ID
- `get_transaction_history_public_treasury` (`read`): This endpoint allows you **query public companies & governments' cryptocurrency transaction history** by Entity ID

### Resource `search`:

- `get_search` (`read`): This endpoint allows you to **search for coins, categories and markets listed on CoinGecko**
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coingecko/coingecko-mcp",
"version": "2.4.0",
"version": "2.5.0",
"description": "The official MCP Server for the Coingecko API",
"author": "Coingecko <eason.lim@coingecko.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const newMcpServer = () =>
new McpServer(
{
name: 'coingecko_coingecko_typescript_api',
version: '2.4.0',
version: '2.5.0',
},
{ capabilities: { tools: {}, logging: {} } },
);
Expand Down
4 changes: 4 additions & 0 deletions packages/mcp-server/src/tools/coins/get-id-coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export const tool: Tool = {
'set to `symbol` to display DEX pair base and target as symbols, default: `contract_address`',
enum: ['contract_address', 'symbol'],
},
include_categories_details: {
type: 'boolean',
description: 'include categories details, default: false',
},
localization: {
type: 'boolean',
description: 'include all the localized languages in the response, default: true',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const tool: Tool = {
},
date: {
type: 'string',
description: 'date of data snapshot (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM`)',
description: 'date of data snapshot (`YYYY-MM-DD`)',
},
localization: {
type: 'boolean',
Expand Down
6 changes: 6 additions & 0 deletions packages/mcp-server/src/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ import get_tokens_networks_onchain_holders_chart from './onchain/networks/tokens
import get_timeframe_tokens_networks_onchain_ohlcv from './onchain/networks/tokens/ohlcv/get-timeframe-tokens-networks-onchain-ohlcv';
import get_tokens_networks_onchain_pools from './onchain/networks/tokens/pools/get-tokens-networks-onchain-pools';
import get_tokens_networks_onchain_trades from './onchain/networks/tokens/trades/get-tokens-networks-onchain-trades';
import get_tokens_networks_onchain_top_traders from './onchain/networks/tokens/top-traders/get-tokens-networks-onchain-top-traders';
import get_pools_onchain_megafilter from './onchain/pools/megafilter/get-pools-onchain-megafilter';
import get_pools_onchain_trending_search from './onchain/pools/trending-search/get-pools-onchain-trending-search';
import get_search_onchain_pools from './onchain/search/pools/get-search-onchain-pools';
import get_addresses_networks_simple_onchain_token_price from './onchain/simple/networks/token-price/get-addresses-networks-simple-onchain-token-price';
import get_holding_chart_public_treasury from './public-treasury/get-holding-chart-public-treasury';
import get_transaction_history_public_treasury from './public-treasury/get-transaction-history-public-treasury';
import get_search from './search/get-search';
import get_search_trending from './search/trending/get-search-trending';
import get_simple_price from './simple/price/get-simple-price';
Expand Down Expand Up @@ -94,10 +97,13 @@ addEndpoint(get_tokens_networks_onchain_holders_chart);
addEndpoint(get_timeframe_tokens_networks_onchain_ohlcv);
addEndpoint(get_tokens_networks_onchain_pools);
addEndpoint(get_tokens_networks_onchain_trades);
addEndpoint(get_tokens_networks_onchain_top_traders);
addEndpoint(get_pools_onchain_megafilter);
addEndpoint(get_pools_onchain_trending_search);
addEndpoint(get_search_onchain_pools);
addEndpoint(get_addresses_networks_simple_onchain_token_price);
addEndpoint(get_holding_chart_public_treasury);
addEndpoint(get_transaction_history_public_treasury);
addEndpoint(get_search);
addEndpoint(get_search_trending);
addEndpoint(get_simple_price);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { isJqError, maybeFilter } from '@coingecko/coingecko-mcp/filtering';
import { Metadata, asErrorResult, asTextContentResult } from '@coingecko/coingecko-mcp/tools/types';

import { Tool } from '@modelcontextprotocol/sdk/types.js';
Expand All @@ -17,8 +16,7 @@ export const metadata: Metadata = {

export const tool: Tool = {
name: 'get_network_networks_onchain_new_pools',
description:
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nThis endpoint allows you to **query all the latest pools based on provided network**\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/new_pool_get_network_response',\n $defs: {\n new_pool_get_network_response: {\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n attributes: {\n type: 'object',\n properties: {\n address: {\n type: 'string'\n },\n base_token_price_native_currency: {\n type: 'string'\n },\n base_token_price_quote_token: {\n type: 'string'\n },\n base_token_price_usd: {\n type: 'string'\n },\n fdv_usd: {\n type: 'string'\n },\n market_cap_usd: {\n type: 'string'\n },\n name: {\n type: 'string'\n },\n pool_created_at: {\n type: 'string'\n },\n price_change_percentage: {\n type: 'object',\n properties: {\n h1: {\n type: 'string'\n },\n h24: {\n type: 'string'\n },\n h6: {\n type: 'string'\n },\n m15: {\n type: 'string'\n },\n m30: {\n type: 'string'\n },\n m5: {\n type: 'string'\n }\n }\n },\n quote_token_price_base_token: {\n type: 'string'\n },\n quote_token_price_native_currency: {\n type: 'string'\n },\n quote_token_price_usd: {\n type: 'string'\n },\n reserve_in_usd: {\n type: 'string'\n },\n transactions: {\n type: 'object',\n properties: {\n h1: {\n type: 'object',\n properties: {\n buyers: {\n type: 'integer'\n },\n buys: {\n type: 'integer'\n },\n sellers: {\n type: 'integer'\n },\n sells: {\n type: 'integer'\n }\n }\n },\n h24: {\n type: 'object',\n properties: {\n buyers: {\n type: 'integer'\n },\n buys: {\n type: 'integer'\n },\n sellers: {\n type: 'integer'\n },\n sells: {\n type: 'integer'\n }\n }\n },\n m15: {\n type: 'object',\n properties: {\n buyers: {\n type: 'integer'\n },\n buys: {\n type: 'integer'\n },\n sellers: {\n type: 'integer'\n },\n sells: {\n type: 'integer'\n }\n }\n },\n m30: {\n type: 'object',\n properties: {\n buyers: {\n type: 'integer'\n },\n buys: {\n type: 'integer'\n },\n sellers: {\n type: 'integer'\n },\n sells: {\n type: 'integer'\n }\n }\n },\n m5: {\n type: 'object',\n properties: {\n buyers: {\n type: 'integer'\n },\n buys: {\n type: 'integer'\n },\n sellers: {\n type: 'integer'\n },\n sells: {\n type: 'integer'\n }\n }\n }\n }\n },\n volume_usd: {\n type: 'object',\n properties: {\n h1: {\n type: 'string'\n },\n h24: {\n type: 'string'\n },\n h6: {\n type: 'string'\n },\n m15: {\n type: 'string'\n },\n m30: {\n type: 'string'\n },\n m5: {\n type: 'string'\n }\n }\n }\n }\n },\n relationships: {\n type: 'object',\n properties: {\n base_token: {\n type: 'object',\n properties: {\n data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n type: {\n type: 'string'\n }\n }\n }\n }\n },\n dex: {\n type: 'object',\n properties: {\n data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n type: {\n type: 'string'\n }\n }\n }\n }\n },\n quote_token: {\n type: 'object',\n properties: {\n data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n type: {\n type: 'string'\n }\n }\n }\n }\n }\n }\n },\n type: {\n type: 'string'\n }\n }\n }\n },\n included: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n attributes: {\n type: 'object',\n properties: {\n address: {\n type: 'string'\n },\n coingecko_coin_id: {\n type: 'string'\n },\n decimals: {\n type: 'integer'\n },\n image_url: {\n type: 'string'\n },\n name: {\n type: 'string'\n },\n symbol: {\n type: 'string'\n }\n }\n },\n type: {\n type: 'string'\n }\n }\n }\n }\n }\n }\n }\n}\n```",
description: 'This endpoint allows you to **query all the latest pools based on provided network**',
inputSchema: {
type: 'object',
properties: {
Expand All @@ -30,16 +28,15 @@ export const tool: Tool = {
description:
'attributes to include, comma-separated if more than one to include \n Available values: `base_token`, `quote_token`, `dex`',
},
include_gt_community_data: {
type: 'boolean',
description:
'include GeckoTerminal community data (Sentiment votes, Suspicious reports) \n Default value: false',
},
page: {
type: 'integer',
description: 'page through results \n Default value: 1',
},
jq_filter: {
type: 'string',
title: 'jq Filter',
description:
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
},
},
required: ['network'],
},
Expand All @@ -49,13 +46,11 @@ export const tool: Tool = {
};

export const handler = async (client: Coingecko, args: Record<string, unknown> | undefined) => {
const { network, jq_filter, ...body } = args as any;
const { network, ...body } = args as any;
try {
return asTextContentResult(
await maybeFilter(jq_filter, await client.onchain.networks.newPools.getNetwork(network, body)),
);
return asTextContentResult(await client.onchain.networks.newPools.getNetwork(network, body));
} catch (error) {
if (error instanceof Coingecko.APIError || isJqError(error)) {
if (error instanceof Coingecko.APIError) {
return asErrorResult(error.message);
}
throw error;
Expand Down
Loading