Skip to content
iTick
  1. 文檔
  2. REST API
  3. 指數數據
  4. 批量即時盤口

批量即時盤口

批量獲取全球主要股票指數的即時盤口深度數據,覆蓋滬深300、上證指數、深證成指、標普500、納斯達克、恆生等核心指數。提供完整的買賣盤口列表,包含多檔價位與掛單量,毫秒級即時更新。

GET/indices/depths

請求參數

regionenum必填

市場代碼

codesstring必填

產品代碼, 多個產品用英文逗號隔開; 不同套餐支持最大數量不同:基礎套餐:10、專業套餐:20、高級套餐:50,企業套餐支持自定義

回應參數

codenumber

回應代碼

msgstring

回應描述

dataobject▶回應結果
sstring

symbol標的代碼

aarray(object)▶賣盤
pointeger

檔位

pnumber

價格

vnumber

掛單量

onumber

訂單數量

barray(object)▶買盤
pointeger

檔位

pnumber

價格

vnumber

掛單量

onumber

訂單數量

程式碼範例

import requests

url = "https://api.itick.org/indices/depths?region=GB&codes=SPX,DJI"

headers = {
"accept": "application/json"
"token": "Your Token"
}

response = requests.get(url, headers=headers)

print(response.text)

查詢 URL

GEThttps://api.itick.org/indices/depths?region=GB&codes=SPX,DJI

,執行查詢

回應結果

{
  "code": 0,
  "msg": null,
  "data": {
    "SPX": {
      "s": "SPX",
      "a": [
        {
          "po": 1,
          "p": 0,
          "v": 0,
          "o": 1
        }
      ],
      "b": [
        {
          "po": 1,
          "p": 0,
          "v": 0,
          "o": 1
        }
      ]
    },
    "DJI": {
      "s": "DJI",
      "a": [
        {
          "po": 1,
          "p": 0,
          "v": 0,
          "o": 1
        }
      ],
      "b": [
        {
          "po": 1,
          "p": 0,
          "v": 0,
          "o": 1
        }
      ]
    }
  }
}