跳转至

← 返回接口目录

股票信息汇总

作用

一次查询某个或多个股票的常用表头信息,把行情、代码表和财务基础信息整理到同一行。

项目 内容
调用方法 client.helpers.stock_profile_table(codes)
返回模型 StockProfileTable
底层能力 0x054c 批量快照0x044d 代码表0x0010 财务基础信息

示例

from eltdx import TdxClient

with TdxClient(timeout=3) as client:
    table = client.helpers.stock_profile_table(["sz000001", "sh600000"])

for row in table.rows:
    print(row.full_code, row.name, row.last_price, row.change_pct, row.amount)

参数

参数 含义
codes 单个代码或代码列表
include_security 是否合并代码表里的名称、品种分类、板块分类,默认 True
include_finance 是否合并财务基础信息里的股本、EPS、上市日期,默认 True

返回字段

StockProfileTable

字段 含义
codes 请求代码
rows StockProfile 列表
count 行数

StockProfile

字段 含义
full_code / exchange / market_id / code 完整代码、市场和六位代码
name 证券名称
category 品种分类,例如 a_shareetfindex
board 板块分类,例如主板、创业板、科创板、北交所
last_price / pre_close_price 最新价 / 昨收
open_price / high_price / low_price 今开 / 最高 / 最低
change / change_pct 涨跌额 / 涨跌幅
volume_hand 成交量,单位手
amount 成交额
open_amount_yuan 开盘金额
circulating_shares / total_shares 流通股本 / 总股本
turnover_rate 换手率,本地按成交量和流通股本计算
circulating_market_value / total_market_value 流通市值 / 总市值
eps 每股收益原始字段
ipo_date / updated_date 上市日期 / 财务数据更新日期
security / quote / finance 合并前的原始模型对象

返回示例

StockProfile(
    full_code="sz000001",
    name="平安银行",
    category="a_share",
    board="main",
    last_price=12.0,
    pre_close_price=10.0,
    change_pct=20.0,
    volume_hand=5000,
    amount=6000000.0,
    circulating_shares=100000000.0,
    turnover_rate=0.5,
)