Skip to main content
GET
按合约获取代币市场图表区间
返回按合约地址标识的代币在两个明确时间点之间的历史序列。id 是资产所在链,contract_address 是代币地址;fromto 为 Unix 秒级时间戳,而响应中的时间戳单位为毫秒。返回 pricesmarket_capstotal_volumes,均为「时间戳,数值」二元组。当你有地址且需要固定时间窗口时使用它。如需回溯窗口,请使用 get_coingecko_token_market_chart;如果你手上是 CoinGecko id 而不是地址,请使用 get_coingecko_coins_id_market_chart_range

授权

Authorization
string
header
必填

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

路径参数

id
string
必填

资产平台 ID(例如 ethereum)。

contract_address
string
必填

Token 合约地址。

查询参数

vs_currency
string
默认值:usd
必填

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

from
integer
必填

起始 UNIX 时间戳(秒)。

to
integer
必填

结束 UNIX 时间戳(秒)。

precision
string

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

响应

200 - application/json

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

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