Skip to content

加密貨幣市場數據卡片 ​

GET /api/v1.0/quote/crypto/market-data-card

獲取加密貨幣市場數據卡片(市值 / 成交額 / 市值佔比)。 傳 symbol(如 CC.BTC)查單個幣;不傳則按 aggregation(ALL / STABLE / OTHER)彙總。

請求參數 ​

參數類型位置必填說明
scenestring查詢是場景:市值 / 成交額 / 市值佔比
time_rangestring查詢否時間範圍,默認 24H
codestring查詢否標的,如 CC.BTC;與 aggregation 二選一,優先 symbol
aggregationstring查詢否未傳 symbol 時的彙總類型,默認 ALL

請求示例 ​

bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/crypto/market-data-card?scene=MARKET_CAP' \
  -H 'Authorization: Bearer <AccessToken>' | jq

響應參數 ​

參數類型說明
data.itemsobject[]
data.items[].timestampint行情時間,Unix 微秒
data.items[].market_capnumber市值,美元,不放大
data.items[].turnover_24hnumber24 小時成交額,美元
data.items[].market_cap_pctnumber市值佔比(百分數)
data.items[].aggregation_typeint彙總類型,1=ALL / 2=STABLE / 3=OTHER;按 symbol 查詢時為 0

錯誤碼 ​

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

響應示例 ​

json
{
  "ret_code": 0,
  "ret_msg": "success",
  "data": {
    "items": [
      {
        "timestamp": 1710000000000000,
        "market_cap": 1.2,
        "turnover_24h": 1.2,
        "market_cap_pct": 1.2,
        "aggregation_type": 0
      }
    ]
  }
}