美股证券列表 在线试调 →
美股证券列表: 代码/名称/类别, 支持名称或代码模糊匹配
接口说明
美股全部在市证券清单:代码、名称、类别。
keyword 同时匹配名称与代码(如 keyword=苹果 或 AAPL)
美股退市/更名频繁,建议每周刷新本地缓存
快速调用
同一调用的三种等价写法,按接入习惯任选其一,复制即可运行。
名称反查代码
import top369 as gp
pro = gp.pro_api("sk-xxxxxxxxxxxx") # 安装: pip install top369
df = pro.us_stock_list(keyword="苹果")
print(df)
代码模糊匹配
import top369 as gp
pro = gp.pro_api("sk-xxxxxxxxxxxx") # 安装: pip install top369
df = pro.us_stock_list(keyword="AAPL")
print(df)
名称反查代码
import requests
API = "https://api.369.top/api"
KEY = "sk-xxxxxxxxxxxx"
r = requests.get(f"{API}/us/stock/list",
headers={"X-API-Key": KEY},
params={"keyword": "苹果"},
timeout=30)
r.raise_for_status()
data = r.json()["data"] # 信封解包, 本接口数据在 data["rows"]
代码模糊匹配
import requests
API = "https://api.369.top/api"
KEY = "sk-xxxxxxxxxxxx"
r = requests.get(f"{API}/us/stock/list",
headers={"X-API-Key": KEY},
params={"keyword": "AAPL"},
timeout=30)
r.raise_for_status()
data = r.json()["data"] # 信封解包, 本接口数据在 data["rows"]
名称反查代码
curl -H "X-API-Key: sk-xxxxxxxxxxxx" \ "https://api.369.top/api/us/stock/list?keyword=%E8%8B%B9%E6%9E%9C"
代码模糊匹配
curl -H "X-API-Key: sk-xxxxxxxxxxxx" \ "https://api.369.top/api/us/stock/list?keyword=AAPL"
输入参数
| 名称 | 类型 | 必选 | 描述 |
|---|---|---|---|
| keyword | str | False | 名称或代码模糊匹配(如: 苹果/AAPL), 缺省全部 |
| limit | int | False | 返回条数上限, 默认100(≤1000) |
返回字段
| 名称 | 类型 | 描述 |
|---|---|---|
| rows[].code | str | 美股代码(大写ticker) |
| rows[].name | str | 证券名称(中文) |
| rows[].category | int | 证券类别码 |
返回数据样例
{
"total": 3,
"rows": [
{
"code": "AAPL",
"name": "苹果",
"category": 13
},
{
"code": "AAPX",
"name": "每日2倍做多苹果",
"category": 13
},
{
"code": "AAPY",
"name": "Kurv产量溢价苹果",
"category": 13
}
]
}
最佳实践:先 /us/stock/list 建本地代码池, 再逐码 /us/stock/day_kline; 美股退市/更名频繁, 建议每周刷新缓存。