Skip to content

加密貨幣恐貪指數歷史與概覽 ​

GET /api/v1.0/quote/crypto/fear-greed/history

獲取加密貨幣恐貪指數歷史與概覽。 time_range:24H / 1W / 1M / 3M / 1Y / ALL。 返回概覽(最新/昨/上週/上月)和按時間的指數序列。

請求參數 ​

參數類型位置必填說明
time_rangestring查詢否時間範圍,默認 1M

請求示例 ​

bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/crypto/fear-greed/history' \
  -H 'Authorization: Bearer <AccessToken>' | jq

響應參數 ​

參數類型說明
data.itemsobject[]
data.items[].timestampint序列時間,Unix 微秒
data.items[].indexint恐貪指數
data.latest_indexint最新恐貪指數
data.yesterday_indexint昨日指數
data.last_week_indexint上週指數
data.last_month_indexint上月指數
data.percentilenumber最新值歷史百分位(百分數)

錯誤碼 ​

ret_codeerror.code說明
0—成功
-3invalid_parameter參數不合法
-8unsupported不支持
-10no_data沒有數據

響應示例 ​

json
{
  "ret_code": 0,
  "ret_msg": "success",
  "data": {
    "items": [
      {
        "timestamp": 1710000000000000,
        "index": 0
      }
    ],
    "latest_index": 0,
    "yesterday_index": 0,
    "last_week_index": 0,
    "last_month_index": 0,
    "percentile": 1.2
  }
}