Sand AISand AI MAGI-2ตอนนี้ MAGI-2 อยู่บน SandBase แล้ว: วิดีโอ 1080p พร้อมเสียงในตัวลองใช้เลย

CoinGecko Coin Historical Data by ID

เอกสาร API
https://api.sandbase.ai/v1/api/coingecko/coins-history

Get the historical data (price, market cap, 24hrs volume, ...) at a given date for a coin based on a particular coin ID

ราคา
$0.008USD / คำขอ
Method
POST
การตอบกลับ
JSON
พารามิเตอร์
2 จำเป็น · 1 ไม่บังคับ

Playground

อินพุต
Coin ID. *refers to [`/coins/list`](/reference/coins-list).
The date of data snapshot. Format: `YYYY-MM-DD`
Include all the localized languages in response. Default: true
เอาต์พุตพร้อมใช้งาน

เอาต์พุตของคุณจะแสดงที่นี่

กรอกอินพุตให้ครบ แล้วคลิก Run

API README

CoinGecko Coin Historical Data by ID API

Returns a snapshot of one coin on a given date. The snapshot holds the coin's value, market cap and trading volume in many fiat and crypto currencies. It needs a CoinGecko coin id and a date.

Use cases

  • Look up the eur value of bitcoin on a past date for tax or accounting records.
  • Compare the market cap of a coin across fiat and crypto currencies on one day.
  • Build a daily history table by calling the API once per date.
  • Show localized coin names in a multi-language app using the localization object.

Request

curl -X POST "https://api.sandbase.ai/v1/api/coingecko/coins-history" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id": "bitcoin", "date": "30-12-2024"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
datestringYesThe date of data snapshot. Format: YYYY-MM-DD
idstringYesCoin ID. *refers to /coins/list.
localizationbooleanNoInclude all the localized languages in response. Default: true

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "id": "bitcoin",
  "image": {
    "small": "https://coin-images.coingecko.com/coins/images/1/small/bitcoin.png?1696501400",
    "thumb": "https://coin-images.coingecko.com/coins/images/1/thumb/bitcoin.png?1696501400"
  },
  "localization": {
    "ar": "Bitcoin (بيتكوين)",
    "bg": "биткойн",
    "cs": "Bitcoin",
    "da": "Bitcoin",
    "de": "Bitcoin",
    "el": "Bitcoin",
    "en": "Bitcoin",
    "es": "Bitcoin",
    "fi": "Bitcoin",
    "fr": "Bitcoin",
    "he": "Bitcoin",
    "hi": "Bitcoin"
  },
  "market_data": {
    "current_price": {
      "aed": 343305.7658195852,
      "ars": 96363245.77150266,
      "aud": 150320.68900219753,
      "bch": 210.85675489002864,
      "bdt": 11162633.882111557,
      "bhd": 35238.609915637775,
      "bits": 1000000,
      "bmd": 93467.14705911094,
      "bnb": 133.14575872653612,
      "brl": 577477.4213900111,
      "btc": 1,
      "cad": 134136.57208747132
    },
    "market_cap": {
      "aed": 6804244126051.13,
      "ars": 1909898155781462.5,
      "aud": 2979322711709.64,
      "bch": 4179134109.4243608,
      "bdt": 221240927434734.72,
      "bhd": 698421431857.6024,
      "bits": 19803021000000,
      "bmd": 1852498121717.9175,
      "bnb": 2638919403.4094796,
      "brl": 11445474395221.982,
      "btc": 19803021,
      "cad": 2658557104439.818
    },
    "total_volume": {
      "aed": 108819726243.11224,
      "ars": 30544846806515.348,
      "aud": 47648067275.66459,
      "bch": 66836553.964847304,
      "bdt": 3538288267030.821,
      "bhd": 11169797498.31152,
      "bits": 316902868429.7276,
      "bmd": 29626852702.037895,
      "bnb": 42204024.68471026,
      "brl": 183046546734.27097,
      "btc": 316902.8684297276,
      "cad": 42518088849.74863
    }
  },
  "name": "Bitcoin",
  "public_interest_stats": {
    "alexa_rank": null,
    "bing_matches": null
  },
  "symbol": "btc"
}

Response fields

FieldMeaning
id / symbol / nameThe coin ID, ticker symbol and display name. In the example, these are bitcoin, btc and Bitcoin.
market_data.current_price.eur / market_data.current_price.jpyThe value of one coin on the requested date, keyed by currency code. Keys such as btc, eth and bnb give the same value in crypto.
market_data.market_cap.eur / market_data.market_cap.jpyThe coin market cap on that date, keyed by currency code.
market_data.total_volume.eur / market_data.total_volume.jpyThe trading volume on that date, keyed by currency code.
localization.en / localization.ja / localization.zhThe coin name in each language, keyed by language code. This object appears when localization is true or left at its default.
image.small / image.thumbURLs of the coin image in two sizes.
public_interest_stats.alexa_rank / public_interest_stats.bing_matchesPublic interest counters. They are null in this response.

Notes

Pricing

$0.008 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

สำรวจเพิ่มเติม

APIs ที่เกี่ยวข้อง

APIs ทั้งหมด
APIราคาการตอบกลับ
CoinGecko$0.008 ต่อการเรียกJSON
CoinGecko$0.008 ต่อการเรียกJSON
CoinGecko$0.008 ต่อการเรียกJSON
CoinGecko$0.008 ต่อการเรียกJSON
CoinGecko$0.008 ต่อการเรียกJSON
CoinGecko$0.008 ต่อการเรียกJSON

คำถาม

คำถามที่พบบ่อย

ฉันจะใช้ CoinGecko Coin Historical Data by ID API ได้อย่างไร?

ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/coingecko/coins-history โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด

CoinGecko Coin Historical Data by ID API ราคาเท่าไร?

$0.008 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน

CoinGecko Coin Historical Data by ID API รับพารามิเตอร์อะไรบ้าง?

ที่ต้องระบุ: id (string) และ date (string). ตัวเลือก: localization (boolean). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์

CoinGecko Coin Historical Data by ID API ส่งคืนอะไร?

การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ

ฉันจำเป็นต้องมีบัญชีนักพัฒนาหรือ API key ของ CoinGecko ไหม?

ไม่จำเป็น CoinGecko Coin Historical Data by ID ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง CoinGecko API แยกต่างหาก