For the complete documentation index, see llms.txt. This page is also available as Markdown.

資產價格

查詢一個或多個資產的價格。未指定時間時取得目前價格;指定時間時取得對應的歷史價格。預設以美元計價,指定 quote 可改用法幣(如 TWD)計價。適合資產估值、帳務換算與損益計算。

get
Authorizations
X-API-KeystringRequired
Query parameters
symbolsstringRequired

逗號分隔幣種(rate_symbol)

Example: BTC,ETH
atinteger · int64Optional

時點(unix 秒);省略=最新

Example: 1700000000
quotestringOptional

計價幣別;省略 = USD。可用的法幣見 /v1/rates/symbols 的 fiat 欄位

Example: TWD
Responses
200

查詢成功,回傳各幣種的價格

application/json
get/v1/rates
GET /v1/rates?symbols=text HTTP/1.1
Host: api.blockchainsecurity.asia
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": {
    "at": null,
    "quote": "USD",
    "rates": [
      {
        "price_usd": 62904.01,
        "symbol": "BTC",
        "ts": 1783328400
      },
      {
        "price_usd": 1765.54,
        "symbol": "ETH",
        "ts": 1783328400
      }
    ]
  },
  "meta": {
    "request_id": "f84a9a65-eab3-44ef-85d4-71ecac57d865"
  }
}

Last updated

Was this helpful?