跳轉到內容

獲取標的當日資金分佈

該接口用於獲取標的當日的資金分佈。

ℹ️Info

Request

Parameters

NameTypeRequiredDescription
symbolstring標的代碼,使用 ticker.region 格式,例如: 700.HK

Protobuf

protobuf
message SecurityRequest {
  string symbol = 1;
}

Request Example

python
# Get Security Capital Distribution
# https://open.longportapp.com/docs/quote/pull/capital-distribution
# 運行前請訪問“開發者中心”確保賬戶有正確的行情權限。
# 如沒有開通行情權限,可以通過“LongPort”手機客戶端,並進入“我的 - 我的行情 - 行情商城”購買開通行情權限。

Response

Response Properties

NameTypeDescription
symbolstring標的代碼
timestampint64數據更新時間戳
capital_inobject[]流入資金
∟ largestring大單
∟ mediumstring中單
∟ smallstring小單
capital_outobject[]流出資金
∟ largestring大單
∟ mediumstring中單
∟ smallstring小單

Protobuf

protobuf
message CapitalDistributionResponse {
  message CapitalDistribution {
    string large = 1;
    string medium = 2;
    string small = 3;
  }
  string symbol = 1;
  int64 timestamp = 2;
  CapitalDistribution capital_in = 3;
  CapitalDistribution capital_out = 4;
}

Response JSON Example

json
{
  "symbol": "700.HK",
  "timestamp": "1655107800",
  "capital_in": {
    "large": "935389700.000",
    "medium": "2056032380.000",
    "small": "828715920.000"
  },
  "capital_out": {
    "large": "1175331560.000",
    "medium": "2271829740.000",
    "small": "751648940.000"
  }
}

錯誤碼

協議錯誤碼業務錯誤碼描述排查建議
3301600無效的請求請求參數有誤或解包失敗
3301606限流降低請求頻次
7301602服務端內部錯誤請重試或聯繫技術人員處理
7301600請求標的不存在檢查請求的 symbol 是否正確
7301603標的無行情標的沒有請求的行情數據
7301604無權限沒有獲取標的行情的權限