加密貨幣恐貪指數歷史與概覽
GET/api/v1.0/quote/crypto/fear-greed/history獲取加密貨幣恐貪指數歷史與概覽。 time_range:24H / 1W / 1M / 3M / 1Y / ALL。 返回概覽(最新/昨/上週/上月)和按時間的指數序列。
請求參數
| 參數 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
time_range | string | 查詢 | 否 | 時間範圍,默認 1M |
請求示例
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/crypto/fear-greed/history' \
-H 'Authorization: Bearer <AccessToken>' | jq響應參數
| 參數 | 類型 | 說明 |
|---|---|---|
data.items | object[] | |
data.items[].timestamp | int | 序列時間,Unix 微秒 |
data.items[].index | int | 恐貪指數 |
data.latest_index | int | 最新恐貪指數 |
data.yesterday_index | int | 昨日指數 |
data.last_week_index | int | 上週指數 |
data.last_month_index | int | 上月指數 |
data.percentile | number | 最新值歷史百分位(百分數) |
錯誤碼
| ret_code | error.code | 說明 |
|---|---|---|
| 0 | — | 成功 |
| -3 | invalid_parameter | 參數不合法 |
| -8 | unsupported | 不支持 |
| -10 | no_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
}
}