跳到主要內容

获取标的列表

获取标的列表

SDK Links

Python
longport.openapi.QuoteContext.security_list
Rust
longport::quote::QuoteContext#security_list
Go
QuoteContext.SecurityList
Node.js
QuoteContext#securityList

Request

HTTP MethodGET
HTTP URL/v1/quote/get_security_list

Parameters

Content-Type: application/json; charset=utf-8

NameTypeRequiredDescription
marketstringYES市场,目前只支持 US
categorystringYES市场下分类,目前只支持 Overnight

Request Example

from longport.openapi import QuoteContext, Config, Market, SecurityListCategory

config = Config.from_env()
ctx = QuoteContext(config)
resp = ctx.security_list(Market.US, SecurityListCategory.Overnight)
print(resp)

Response

Response Headers

  • Content-Type: application/json

Response Example

{
"code": 0,
"data": {
"list": [
{
"symbol": "BAC.US",
"name_cn": "美国银行",
"name_hk": "美國銀行",
"name_en": "Bank of America"
},
{
"symbol": "RDDT.US",
"name_cn": "REDDIT INC",
"name_hk": "REDDIT INC",
"name_en": "REDDIT INC"
},
{
"symbol": "GOOGL.US",
"name_cn": "谷歌-A",
"name_hk": "谷歌-A",
"name_en": "Alphabet"
}
]
}
}

Response Status

StatusDescriptionSchema
200返回成功security_response
400参数错误None

Schemas

security_response

NameTypeRequiredDescription
listobject[]false列表
∟ symbolintegertrue标的代码
∟ name_cnstringtrue中文名称
∟ name_hkstringtrue繁体名称
∟ name_enstringtrue英文名称

错误码

业务错误码描述排查建议
310010无效的请求请求参数有误
310011服务端内部错误请重试或联系技术人员处理