跳到主要內容

获取标的基础信息

该接口用于获取标的的基础信息。

SDK Links

Python
longport.openapi.QuoteContext.static_info
Rust
longport::quote::QuoteContext#static_info
Go
QuoteContext.StaticInfo
Node.js
QuoteContext#staticInfo
信息

Request

Parameters

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

校验规则:
每次请求支持传入的标的数量上限是 500

Protobuf

message MultiSecurityRequest {
repeated string symbol = 1;
}

Request Example

# 获取标的基础信息
# https://open.longportapp.com/docs/quote/pull/static
# 运行前请访问“开发者中心”确保账户有正确的行情权限。
# 如没有开通行情权限,可以通过“LongPort”手机客户端,并进入“我的 - 我的行情 - 行情商城”购买开通行情权限。
from longport.openapi import QuoteContext, Config

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

resp = ctx.static_info(["700.HK", "AAPL.US", "TSLA.US", "NFLX.US"])
print(resp)

Response

Response Properties

NameTypeDescription
secu_static_infoobject[]标的基础数据列表
∟ symbolstring标的代码
∟ name_cnstring中文简体标的名称
∟ name_enstring英文标的名称
∟ name_hkstring中文繁体标的名称
∟ exchangestring标的所属交易所
∟ currencystring交易币种

可选值:
CNY
USD
SGD
HKD
∟ lot_sizeint32每手股数
∟ total_sharesint64总股本
∟ circulating_sharesint64流通股本
∟ hk_sharesint64港股股本 (仅港股)
∟ epsstring每股盈利
∟ eps_ttmstring每股盈利 (TTM)
∟ bpsstring每股净资产
∟ dividend_yieldstring股息
∟ stock_derivativesint32[]如果标的是正股,可提供的衍生品行情类型

可选值:
1 - 期权
2 - 轮证
∟ boardstring标的所属板块,详见 Board

Protobuf

message SecurityStaticInfoResponse {
repeated StaticInfo secu_static_info = 1;
}

message StaticInfo {
string symbol = 1;
string name_cn = 2;
string name_en = 3;
string name_hk = 4;
string listing_date = 5;
string exchange = 6;
string currency = 7;
int32 lot_size = 8;
int64 total_shares = 9;
int64 circulating_shares = 10;
int64 hk_shares = 11;
string eps = 12;
string eps_ttm = 13;
string bps = 14;
string dividend_yield = 15;
repeated int32 stock_derivatives = 16;
string board = 17;
}

Response JSON Example

{
"secu_static_info": [
{
"symbol": "700.HK",
"name_cn": "腾讯控股",
"name_en": "TENCENT",
"name_hk": "騰訊控股",
"exchange": "SEHK",
"currency": "HKD",
"lot_size": 100,
"total_shares": 9612464038,
"circulating_shares": 9612464038,
"hk_shares": 9612464038,
"eps": "28.4394",
"eps_ttm": "28.4394",
"bps": "103.40413",
"dividend_yield": "1.6",
"stock_derivatives": [2],
"board": "HKEquity"
},
{
"symbol": "AAPL.US",
"name_cn": "苹果",
"name_en": "Apple Inc.",
"exchange": "NASD",
"currency": "USD",
"lot_size": 1,
"total_shares": 1631944100,
"circulating_shares": 16302661350,
"eps": "5.669",
"eps_ttm": "6.0771",
"bps": "4.40197",
"dividend_yield": "0.85",
"stock_derivatives": [1],
"board": "USMain"
}
]
}

错误码

协议错误码业务错误码描述排查建议
3301600无效的请求请求参数有误或解包失败
3301606限流降低请求频次
7301602服务端内部错误请重试或联系技术人员处理
7301607接口限制请求的标的数量超限,请减少单次请求标的数量