Files
pytdxdata/pyproject.toml
openbot-coder 7c4541a315 fix(ex): 期货/期权K线 amount 恒 0 + 补齐持仓量 position 字段 (#17)
- 0x23FF 帧内无成交额槽位(协议语义,非解析遗漏),期货/期权 amount
  按 close×vol×合约乘数 估算(新增 ex_multiplier 乘数表,覆盖
  cffex/shf/dl/zz/gz 主流品种 + 股票期权 10000;未知品种保持 0.0 不编造)
- position(持仓量)协议层早已解析但 api 层丢弃,v3 起透传至
  SecurityBar.position(权益类市场无此概念 → None)
- 缓存 schema v2→v3:旧缓存 amount 恒 0/无 position,自然失效重建
- 真机验证:rb2611/IFL0/au2611/上交所期权 10011425 日线
  amount/settle/position 全部有值
2026-11-14 14:16:10 +08:00

69 lines
2.0 KiB
TOML

[project]
name = "pytdxdata"
version = "0.7.3"
description = "通达信(TongDaXin)行情数据客户端:动态连接池 + 双层TTL缓存 + 3连接并发分页,纯asyncio零运行时依赖,支持A股/港股/美股/期货/期权"
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
license-files = ["LICENSE"]
keywords = ["tdx", "trading", "stock", "kline", "quote", "通达信", "A股", "港股", "美股", "期货", "asyncio", "quant"]
authors = [
{ name = "openbot-coder", email = "openbot-coder@users.noreply.github.com" }
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Financial and Insurance Industry",
"Topic :: Office/Business :: Financial :: Investment",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"Framework :: AsyncIO",
"Typing :: Typed",
]
dependencies = []
[project.urls]
Homepage = "https://github.com/openbot-coder/pytdxdata"
Repository = "https://github.com/openbot-coder/pytdxdata"
Documentation = "https://openbot-coder.github.io/pytdxdata/"
[project.optional-dependencies]
uvloop = ["uvloop>=0.21"]
pandas = ["pandas>=2.0"]
polars = ["polars>=1.0"]
dataframe = ["pandas>=2.0", "polars>=1.0"]
dev = ["pytest>=8.0", "pytest-asyncio>=0.24", "ruff>=0.6"]
[project.scripts]
tdx = "pytdxdata.cli:main"
[build-system]
requires = ["uv_build>=0.11.1,<0.12.0"]
build-backend = "uv_build"
[tool.ruff]
line-length = 100
target-version = "py313"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
[dependency-groups]
dev = [
"pytest>=9.1.1",
"pytest-asyncio>=1.4.0",
# DataFrame 后端的双实现都要在本地/CI 里被真实覆盖,不能只在 extras 里声明
"pandas>=2.0",
"polars>=1.0",
]
docs = [
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.26",
"ruff>=0.6",
"jieba>=0.42",
]