> For the complete documentation index, see [llms.txt](https://docs.blockchainsecurity.asia/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blockchainsecurity.asia/api-reference/readme/assets-and-market-data/zi-chan-jia-ge.md).

# 資產價格

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

## GET /v1/rates

>

```json
{"openapi":"3.1.0","info":{"title":"Blockchain Atlantis API Gateway","version":"0.1.0"},"tags":[{"description":"查詢一個或多個資產的價格。未指定時間時取得目前價格；指定時間時取得對應的歷史價格。預設以美元計價，指定 quote 可改用法幣（如 TWD）計價。適合資產估值、帳務換算與損益計算。","name":"資產價格"}],"servers":[{"description":"Production","url":"https://api.blockchainsecurity.asia"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"in":"header","name":"X-API-Key","type":"apiKey"}},"schemas":{"ErrorResponse":{"description":"對外錯誤信封。與成功回應的 `{ data, meta }` 信封結構對稱，\n客戶端永遠拿到 `{ \"error\": { \"code\": ..., \"message\": ... } }`。\n\n同時是 OpenAPI 的錯誤 schema：所有非 2xx 回應都是這個形狀，端點文件以\n`body = ErrorResponse` 引用它，客戶端只要寫一次錯誤解析。","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"required":["error"],"type":"object"},"ErrorDetail":{"description":"錯誤本體。`code` 是穩定的機器可讀字串（比 HTTP 狀態碼細緻），\n`message` 是給人看的說明，不保證格式穩定——請用 `code` 做程式判斷。","properties":{"code":{"description":"機器可讀錯誤碼，例如 `bad_request` / `insufficient_credit` / `gateway_timeout`。","type":"string"},"message":{"description":"人可讀的錯誤說明。","type":"string"}},"required":["code","message"],"type":"object"}}},"paths":{"/v1/rates":{"get":{"operationId":"rates.price.v1","parameters":[{"description":"逗號分隔幣種（rate_symbol）","in":"query","name":"symbols","required":true,"schema":{"type":"string"}},{"description":"時點（unix 秒）；省略=最新","in":"query","name":"at","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"計價幣別；省略 = USD。可用的法幣見 /v1/rates/symbols 的 fiat 欄位","in":"query","name":"quote","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{}},"description":"查詢成功，回傳各幣種的價格"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"請求參數有誤，請提供 symbols"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"缺少或無效的 API key"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"目前方案不含此端點"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"指定的計價幣別在該時點沒有匯率資料"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"請求過於頻繁，請依 Retry-After 退避後重試"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"伺服器內部錯誤"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"後端服務暫時無法回應，請稍後重試"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"後端服務暫時過載，請退避後重試"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"查詢逾時，請稍後重試"}},"summary":"","tags":["資產價格"]}}}}
```
