mirror of
https://ghfast.top/https://github.com/aeroxw/easy-tdx.git
synced 2026-09-12 20:24:16 +08:00
- K-line: daily+ periods output 'date' only, minute periods output 'datetime' - Transactions (tick-by-tick): combine date param + hour/minute into 'datetime' - XdxrRecord, HistoricalFundFlow: year/month/day merged to 'date' - MinuteBar: rename unknown_1 to _unknown_1 (hidden from DataFrame) - MinuteBar: add datetime column computed from bar index (A-share 240-bar pattern) - get_minute_time_data: use history endpoint only (current-day endpoint broken in pytdx too) - Update all examples to reflect new DataFrame column names
15 lines
430 B
Python
15 lines
430 B
Python
"""演示:获取板块信息(行业、概念、风格)。
|
|
|
|
常用板块文件:
|
|
'block_zs.dat' - 行业/指数板块
|
|
'block_gn.dat' - 概念板块
|
|
'block_fg.dat' - 风格板块
|
|
"""
|
|
|
|
from easy_tdx import TdxClient
|
|
|
|
with TdxClient.from_best_host() as c:
|
|
df = c.get_block_info("block_gn.dat")
|
|
print(f"概念板块,共 {len(df)} 个:")
|
|
print(df[["name", "category", "count"]].head(20).to_string(index=False))
|