跳转至

常用问题

这一页按使用问题组织。每个问题链接到单独文档,里面包含调用方法、参数、返回字段和示例。

股票和行情

题材和概念板块

竞价

快速示例

from eltdx import TdxClient

with TdxClient(timeout=3) as client:
    table = client.helpers.stock_profile_table(["sz000001", "sh600000"])
    shortline = client.helpers.shortline_indicators(["sz000001", "sh600000"])
    topics = client.helpers.stock_topics("000034")
    stocks = client.helpers.topic_stocks("000034", topic_name="存储芯片")
    auction = client.helpers.auction_data("sz000001", "2026-05-20")

print(table.rows[0])
print(shortline.rows[0])
print(topics.topics[:3])
print(stocks.rows[:10])
print(auction.open_price, auction.open_change_pct, auction.open_amount)

返回模型

返回模型是 dataclass,可以直接访问字段,也可以用 to_jsonable() / to_json() 转成字典或 JSON。

from eltdx import to_jsonable

data = to_jsonable(table)