获取标的基础信息
该接口用于获取标的的基础信息。
SDK Links
Python |
Rust |
Go |
Node.js |
信息
业务指令:10
Request
Parameters
Name | Type | Required | Description |
---|---|---|---|
symbol | string[] | 是 | 标的代码列表,使用 ticker.region 格式,例如:[700.HK] 校验规则: 每次请求支持传入的标的数量上限是 500 个 |
Protobuf
message MultiSecurityRequest {
repeated string symbol = 1;
}
Request Example
- Python
- JavaScript
# 获取标的基础信息
# 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)
const { Config, QuoteContext } = require('longport')
let config = Config.fromEnv()
QuoteContext.new(config)
.then((ctx) => ctx.staticInfo(['700.HK', 'AAPL.US', 'TSLA.US', 'NFLX.US']))
.then((resp) => {
for (let obj of resp) {
console.log(obj.toString())
}
})
Response
Response Properties
Name | Type | Description |
---|---|---|
secu_static_info | object[] | 标的基础数据列表 |
∟ symbol | string | 标的代码 |
∟ name_cn | string | 中文简体标的名称 |
∟ name_en | string |