跳转到内容

获取标的当日资金流向

该接口用于获取标的当日的资金流向。

ℹ️Info

Request

Parameters

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

Protobuf

protobuf
message CapitalFlowIntradayRequest {
  string symbol = 1;
}

Request Example

python
from longport.openapi import QuoteContext, Config

config = Config.from_env()
ctx = QuoteContext(config)

resp = ctx.capital_flow("700.HK")
print(resp)

Response

Response Properties

NameTypeDescription
symbolstring标的代码
capital_flow_linesobject[]资金流向数据
∟ inflowstring净流入
∟ timestampint64分钟开始时间戳

Protobuf

protobuf
message CapitalFlowIntradayResponse {
  message CapitalFlowLine {
    string inflow = 1;
    int64 timestamp = 2;
  }
  string symbol = 1;
  repeated CapitalFlowLine capital_flow_lines = 2;
}

Response JSON Example

json
{
  "symbol": "700.HK",
  "capital_flow_lines": [
    { "inflow": "-310255860.000", "timestamp": "1655106960" },
    { "inflow": "-314011220.000", "timestamp": "1655107020" },
    { "inflow": "-314011220.000", "timestamp": "1655107080" },
    { "inflow": "-314011220.000", "timestamp": "1655107140" },
    { "inflow": "-314011220.000", "timestamp": "1655107200" }
  ]
}

错误码

协议错误码业务错误码描述排查建议
3301600无效的请求请求参数有误或解包失败
3301606限流降低请求频次
7301602服务端内部错误请重试或联系技术人员处理
7301600请求标的不存在检查请求的 symbol 是否正确
7301603标的无行情标的没有请求的行情数据
7301604无权限没有获取标的行情的权限