價格歷史

GET /price-history
GetPriceHistory

資產隨時間變化的價格,可對照其社群資料閱讀。指數值以指數點為單位。若某加密資產沒有交易所 K 線,high_usd 與 low_usd 為過去 24 小時的區間。

可使用錢包於 https://nebula-api.hiddensystems.ai/api/v1/x402/price-history 付款。不需要 Nebula 帳號或 API 金鑰;簽署前請先確認付款條件。x402 付款指南。

參數

asset_id string QUERY 必填

來自 /assets 或 /search 的資產 ID,例如 NVDA、GLD、SPX 或 bitcoin。請與一併回傳的 asset_class 一起送出。

Example:NVDA

asset_class string QUERY 必填

asset_id 所指資產的類別:equity(股票與 ETF)、commodity、index 或 crypto。請送出 /assets 或 /search 隨 asset_id 一併回傳的 asset_class。

允許的值
equitycommodityindexcrypto

Example:equity

hours integer QUERY

回溯期間,以小時為單位。免費方案可回溯 90 天;更早的期間會回傳 403。

Default:168

granularity string QUERY

要求的時間序列分桶大小。省略時,服務會依回看區間選擇合適的分桶大小。

允許的值
1h2h4h12h1d

Example:1h

cURL 範例

curl --get \
  --url 'https://nebula-api.hiddensystems.ai/api/v1/public/price-history' \
  --data-urlencode 'asset_id=NVDA' \
  --data-urlencode 'asset_class=equity' \
  --header 'X-API-Key: YOUR_API_KEY'

回應

200 OK
400 錯誤的要求
401 未經授權
402 額度已用完;回應會包含續約時間與已購買的額度餘額
403 禁止
404 找不到
405 不允許的方法;Allow 標頭會列出支援的方法
429 要求過多
500 內部伺服器錯誤
503 服務無法使用

媒體類型 application/json

series
array<object> 必填

依時間順序排列的觀測值。

series[].high_usd
number (double) 選填

觀測到的最高價,以美元計。

series[].low_usd
number (double) 選填

觀測到的最低價,以美元計。

series[].price_usd
number (double) 選填

最新或觀測到的市場價格,以美元計。

series[].timestamp
string (date-time) 必填

觀測值或分桶開始時間的 UTC RFC 3339 時間戳記。

{
  "series": [
    {
      "high_usd": 184.17,
      "low_usd": 179.82,
      "price_usd": 182.41,
      "timestamp": "2026-08-07T15:00:00Z"
    }
  ]
}