資料 API / CoinGecko / Coins
Coin Market Chart Range
Historical series for one coin between two explicit points in time. from and to are Unix timestamps in seconds, while the timestamps inside the response are in milliseconds — the two are not the same unit, which is the usual source of empty or misaligned results. Returns prices, market_caps and total_volumes as timestamp-and-value pairs; CoinGecko picks granularity from the window length. Use it to line a series up with a known event window. For a trailing window ending now, get_coingecko_coins_id_market_chart takes a days count instead.
參數
路徑
idstring必填CoinGecko coin ID (e.g.,
bitcoin,ethereum). Get the list via/coins/list.
查詢
vs_currencystring必填Target currency for price (e.g.,
usd,eur,btc). See/simple/supported_vs_currencies.frominteger必填Start UNIX timestamp (seconds).
tointeger必填End UNIX timestamp (seconds).
precisionstring選填fullor a value from0to18to specify decimal places for currency price values.
請求範例
curl -G "https://openapi.felo.ai/v1/beta/coingecko/coins/{id}/market_chart/range" \
--data-urlencode "vs_currency=<string>" \
--data-urlencode "from=<integer>" \
--data-urlencode "to=<integer>" \
-H "Authorization: Bearer $FELO_API_KEY"回應
回應欄位
pricesnumber[][]選填market_capsnumber[][]選填total_volumesnumber[][]選填