Skip to main content
GET
按合约查询代币历史图表
返回按合约地址标识的代币在由 days 指定的回溯窗口内的历史序列。id 是资产所在链,contract_address 是代币地址。返回 pricesmarket_capstotal_volumes,均为「时间戳,数值」二元组,时间戳单位为毫秒——结构与 get_coingecko_coins_id_market_chart 相同。当你手上是地址而不是 CoinGecko id 时使用它。如需明确的起止时间,请使用 get_coingecko_token_market_chart_range

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

路径参数

id
string
必填

平台 ID。

contract_address
string
必填

合约地址。

查询参数

vs_currency
string
默认值:usd
必填

价格的目标货币(例如 usdeurbtc)。请参阅 /simple/supported_vs_currencies

days
string
必填

截至 N 天前的数据。接受 17143090180365max

precision
string

使用 full018 之间的值指定货币价格值的小数位数。

响应

200 - application/json

数据结构与 /coins/{id}/market_chart 相同。

prices
number[][]
market_caps
number[][]
total_volumes
number[][]