TqSdk 期货接口
TqSdk 期货接口:TqSdk 是中国期货市场的实时行情获取与策略回测框架,支持期权定价模型构建和波动率因子分析,可用于网格交易、目标仓位管理等量化场景。 含 25 条反模式约束。
晶体简介
Constraints
Evidence Quality
Medium confidence — review before critical use
37 条不可违反的约束
WHENWhen implementing market data reconnection logic
ACTIONVerify each K-line data has last_id != -1 and quote data matches the subscribed ins_list before resuming processing
CONSEQUENCEMarket data gaps will appear in the equity curve when _is_all_received returns prematurely, causing K-lines to have missing historical bars or quotes to show stale data in live trading
WHENWhen implementing trade data reconnection logic
ACTIONVerify trade_more_data == False for each tracked users before resuming processing
CONSEQUENCETrade confirmations will be duplicated or missing after reconnection, causing position discrepancies and potential over-trading when the system resumes with incomplete trade data
WHENWhen processing reconnection data flow
ACTIONChain reconnect handlers between TqConnect and api channels to verify data buffering during reconnection
CONSEQUENCESkipping the reconnect handler chain will cause data loss when reconnection occurs, as the system will forward packets before confirming completeness
常见问题
讨论 (0)
暂无讨论,成为第一个发言的人吧!
更新历史
v0.1.0: 首次发布到 Doramagic.ai。基于 zvtvz/zvt 的自动化 batch-v1 元数据 + 自动生成 FAQ。