idstringerforderlich
Coin ID. *refers to [`/coins/list`](/reference/coins-list).
Standard: "bitcoin"
https://api.sandbase.ai/v1/api/coingecko/coins-market-chartGet the historical chart data of a coin including time in UNIX, price, market cap and 24hr volume based on particular coin ID
Ihre Ausgabe wird hier angezeigt
Vervollständigen Sie die Eingaben und klicken Sie dann auf Ausführen.
Returns historical price, market cap and total volume series for one coin on CoinGecko. You pass a coin id such as bitcoin, a number of days and a vs_currency such as usd.
vs_currency.curl -X POST "https://api.sandbase.ai/v1/api/coingecko/coins-market-chart" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "bitcoin", "days": "1", "vs_currency": "usd"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
days | string | Yes | Data up to number of days ago. You may use any integer or max for number of days. |
id | string | Yes | Coin ID. *refers to /coins/list. |
vs_currency | string | Yes | Target currency of market data. *refers to /simple/supported_vs_currencies. |
interval | string | No | Data interval, leave empty for auto granularity. |
precision | string | No | Decimal place for currency price value. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"market_caps": [
[
1793604600000
]
],
"prices": [
[
1793604600000
]
],
"total_volumes": [
[
1793604600000
]
]
}
| Field | Meaning |
|---|---|
prices | List of [timestamp, price] pairs. The price is in the currency set by vs_currency. |
prices[][0] / market_caps[][0] / total_volumes[][0] | Timestamp of the data point, as a UNIX time value in milliseconds (for example 1793604600000). |
prices[][1] | Coin price at that timestamp. |
market_caps | List of [timestamp, market cap] pairs for the coin. |
market_caps[][1] | Market cap value at that timestamp. |
total_volumes | List of [timestamp, volume] pairs for the coin's trading volume. |
total_volumes[][1] | Trading volume value at that timestamp. |
id from CoinGecko Coins List (ID Map).vs_currency values from CoinGecko Supported Currencies List.days set to 1, points are 5 minutes apart.$0.008 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Jetzt loslegen
Plattform-API-Endpunkt mit einheitlicher Authentifizierung und Nutzungsnachverfolgung.
curl -X POST "https://api.sandbase.ai/v1/api/coingecko/coins-market-chart" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "bitcoin",
"days": "1",
"vs_currency": "usd"
}'Legen Sie Ihren SandBase API-Schlüssel in Ihrer Serverumgebung fest. Anfragen verwenden Bearer-Authentifizierung.
export SANDBASE_API_KEY="YOUR_API_KEY"Bewahren Sie Ihren Schlüssel auf dem Server auf. Geben Sie ihn nicht in Browser-Code preis.
idstringerforderlichCoin ID. *refers to [`/coins/list`](/reference/coins-list).
Standard: "bitcoin"
daysstringerforderlichData up to number of days ago. You may use any integer or `max` for number of days.
Standard: "1"
vs_currencystringerforderlichTarget currency of market data. *refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies).
Standard: "usd"
intervalstringData interval, leave empty for auto granularity.
Mögliche Werte: 1m, 5m, hourly, daily
precisionstringDecimal place for currency price value.
Mögliche Werte: full, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
Gespeicherte Beispielantwort für diese API; beim Anzeigen wird keine Live-Anfrage gesendet.
Es wurde keine gespeicherte Antwort veröffentlicht. Führen Sie die API in Playground aus, um die Antwort zu prüfen.
Mehr entdecken
| API | Preis | Antwort |
|---|---|---|
CoinGecko | $0.008 pro Aufruf | JSON |
CoinGecko | $0.008 pro Aufruf | JSON |
CoinGecko | $0.008 pro Aufruf | JSON |
CoinGecko | $0.008 pro Aufruf | JSON |
CoinGecko | $0.008 pro Aufruf | JSON |
CoinGecko | $0.008 pro Aufruf | JSON |
Fragen
Senden Sie eine POST-Anfrage an https://api.sandbase.ai/v1/api/coingecko/coins-market-chart mit Ihrem SandBase API-Schlüssel im Authorization-Header (Bearer) und den Parametern als JSON-Body. Sie können das auch ohne Code direkt auf dieser Seite im Playground testen.
$0.008 pro Aufruf, abgerechnet von Ihrem SandBase-Guthaben. Es werden nur die von Ihnen getätigten Aufrufe berechnet; es gibt kein Abo.
Erforderlich: id (string), days (string) und vs_currency (string). Optional: interval (eines von 1m, 5m, hourly, daily) und precision (eines von full, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18). Die Parametertabelle und der Playground auf dieser Seite listen jedes Feld auf.
Eine JSON-Antwort, die in derselben HTTP-Anfrage zurückgegeben wird (synchron). Die README auf dieser Seite enthält eine Beispielantwort.
Nein. CoinGecko Coin Historical Chart Data by ID läuft über SandBase, daher deckt ein SandBase API-Schlüssel diesen Endpunkt und jede andere API sowie jedes Modell im Katalog ab. Sie müssen keinen separaten Zugang für CoinGecko API beantragen.