工具 API
get_ coins_ top_ gainers_ losers
When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance. Only omit if you're sure you don't need the data. This endpoint allows you to **query the top 30 coins with largest price gain and loss by a specific time duration** # Response Schema ```json { $ref: '#/$defs/top_gainers_loser_get_response', $defs: { top_gainers_loser_get_response: { type: 'object', properties: { top_gainers: { type: 'array', items: { type: 'object', properties: { id: { type: 'string', description: 'coin ID' }, image: { type: 'string', description: 'coin image url' }, market_cap_rank: { type: 'number', description: 'coin rank by market cap' }, name: { type: 'string', description: 'coin name' }, symbol: { type: 'string', description: 'coin symbol' }, usd: { type: 'number', description: 'coin price in USD' }, usd_14d_change: { type: 'number', description: 'coin 14 day change percentage in USD' }, usd_1h_change: { type: 'number', description: 'coin 1hr change percentage in USD' }, usd_1y_change: { type: 'number', description: 'coin 1 year change percentage in USD' }, usd_200d_change: { type: 'number', description: 'coin 200 day change percentage in USD' }, usd_24h_change: { type: 'number', description: 'coin 24hr change percentage in USD' }, usd_24h_vol: { type: 'number', description: 'coin 24hr volume in USD' }, usd_30d_change: { type: 'number', description: 'coin 30 day change percentage in USD' }, usd_7d_change: { type: 'number', description: 'coin 7 day change percentage in USD' } } } }, top_losers: { type: 'array', items: { type: 'object', properties: { id: { type: 'string', description: 'coin ID' }, image: { type: 'string', description: 'coin image url' }, market_cap_rank: { type: 'number', description: 'coin rank by market cap' }, name: { type: 'string', description: 'coin name' }, symbol: { type: 'string', description: 'coin symbol' }, usd: { type: 'number', description: 'coin price in USD' }, usd_14d_change: { type: 'number', description: 'coin 14 day change percentage in USD' }, usd_1h_change: { type: 'number', description: 'coin 1hr change percentage in USD' }, usd_1y_change: { type: 'number', description: 'coin 1 year change percentage in USD' }, usd_200d_change: { type: 'number', description: 'coin 200 day change percentage in USD' }, usd_24h_change: { type: 'number', description: 'coin 24hr change percentage in USD' }, usd_24h_vol: { type: 'number', description: 'coin 24hr volume in USD' }, usd_30d_change: { type: 'number', description: 'coin 30 day change percentage in USD' }, usd_7d_change: { type: 'number', description: 'coin 7 day change percentage in USD' } } } } } } } } ```
调用信息
- 工具标识
- coingecko-demo.get_coins_top_gainers_losers
- 服务提供方
- CoinGecko
- 平均响应
- 0 ms
- 近 7 天调用
- 0
输入参数
vs_currency必填target currency of coins *refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies).
durationfilter result by time range Default value: `24h`
price_change_percentageinclude price change percentage timeframe, comma-separated if query more than 1 price change percentage timeframe Valid values: 1h, 24h, 7d, 14d, 30d, 200d, 1y
top_coinsfilter result by market cap ranking (top 300 to 1000) or all coins (including coins that do not have market cap) Default value: `1000`
jq_filterA 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. For example: to include only the `name` field in every object of a results array, you can provide ".results[].name". For more information, see the [jq documentation](https://jqlang.org/manual/).