Skip to main content

Module trade_query

Module trade_query 

Source

Structs§

CryptoCashLogInfo
CryptoMaxBuySellQtyInfo
CryptoOrderFeeInfo
CryptoOrderFeeItem
CurrentOrderQueryResult
OrderFillInfo
Cached current-order fill row, matching the public/backend projection used by current fill queries and direct fill notifications.

Enums§

Cmd3020QuoteLevel
C++ NNProto_Trd_AccReal::QueryAssetInner quote-level fact for real CMD3020 requests. The caller must snapshot this from the shared QotRightCache; the backend adapter deliberately has no silent default.
TradeBackendChannel
TradeQueryBodyProto
TradeQueryOperation

Constants§

CMD_ACCOUNT_INFO
账户资产查询命令 ID (真实账户: 资金+持仓)
CMD_FUND_BOND_DETAIL_ASSET
基金/债券总资产查询命令 ID。仅真实账户 sidecar;C++ 从 NNProto_Trd_AccReal::QueryFundNoLimit 经 Broker 通道发送,无模拟路径。
CMD_QUERY_FUND
资金查询 base command ID。真实 GetFunds 不直接发此 cmd:C++ real 分支 走 CMD3020 AccountInfoReq;SIM 分支走 registry 中的 14704。 注意:4704 不是模拟账户资金 wire cmd。
CMD_QUERY_HISTORY_ORDER_FILL_LIST
历史成交查询命令 ID
CMD_QUERY_HISTORY_ORDER_LIST
历史订单查询命令 ID
CMD_QUERY_ORDER_FILL_INFO
指定成交 ID 查询命令 ID。C++ QueryDealInfo 在成交通知 NOTICE_TYPE_ORDER_FILL_UPDATE 中使用,不等同于成交列表 4710。
CMD_QUERY_ORDER_FILL_LIST
成交列表查询命令 ID
CMD_QUERY_ORDER_INFO
指定订单 ID 查询命令 ID。C++ push NOTICE_TYPE_ORDER_UPDATE / NOTICE_TYPE_ORDER_OP_RESULT 使用此 detail path,不用 4708 全量订单列表代替。
CMD_QUERY_ORDER_LIST
订单查询命令 ID
CMD_QUERY_POSITION
持仓查询 base command ID。真实 GetPositionList 不直接发此 cmd:C++ real 分支走 CMD3020 AccountInfoReq;SIM 分支走 registry 中的 14705。 注意:4705 不是模拟账户持仓 wire cmd。
CMD_SIM_QUERY_FUND
v1.4.53 BUG-6: Sim 账户资金查询 CMD。显式登记,禁止调用点用 offset 推导。
CMD_SIM_QUERY_HISTORY_ORDER_FILL_LIST
Sim 账户历史成交查询 CMD。显式登记,禁止调用点用 offset 推导。
CMD_SIM_QUERY_HISTORY_ORDER_LIST
Sim 账户历史订单查询 CMD。显式登记,禁止调用点用 offset 推导。
CMD_SIM_QUERY_ORDER_FILL_INFO
Sim 账户指定成交 ID 查询 CMD。显式登记,禁止调用点用 offset 推导。 Offset/callback command exists, but C++ NNProto_Trd_DealSimulate::QueryDealInfo returns 0 without sending it. Do not treat this constant as runtime support.
CMD_SIM_QUERY_ORDER_FILL_LIST
Sim 账户成交列表查询 CMD。显式登记,禁止调用点用 offset 推导。 Offset/callback command exists, but C++ NNProto_Trd_DealSimulate::QueryDealList returns 0 without sending it. Do not treat this constant as runtime support.
CMD_SIM_QUERY_ORDER_INFO
Sim 账户指定订单 ID 查询 CMD。显式登记,禁止调用点用 offset 推导。
CMD_SIM_QUERY_ORDER_LIST
v1.4.106: Sim 账户订单查询 CMD。显式登记,禁止调用点用 offset 推导。
CMD_SIM_QUERY_POSITION
v1.4.53 BUG-6: Sim 账户持仓查询 CMD。注意 4705 是 base QueryPositionList, 14705 才是 sim 专用 wire cmd。
TRADE_QUERY_COMMANDS

Functions§

backend_order_status_to_ftapi
Backend odr_sys_cmn::OrderStatus -> FTAPI Trd_Common::OrderStatus.
backend_real_market_to_trd_market_like_cpp
Backend real market -> FTAPI TrdMarket.
create_backend_req_id
Create C++-shaped backend MsgHeader.req_id.
hash_str_to_u64
C++ HashStrToU64 compatibility wrapper for existing backend call sites.
history_order_fill_list_cmd_for_env
history_order_list_cmd_for_env
init_trade_data
为所有真实账户查询资金和持仓 (CMD 3020)
is_valid_real_trd_market_like_cpp
C++ accepted real-account trade markets after backend-market conversion.
order_fill_info_cmd_for_env
order_fill_list_cmd_for_env
order_info_cmd_for_env
order_proto_to_cached_like_cpp
query_account_info
查询真实账户资金+持仓 (CMD 3020: AccountInfoReq)
query_account_info_after_trade_push
Refresh real-account assets after CMD4716 ASSET/QUOTE notification.
query_crypto_account_info
Query crypto account funds through CMD20631.
query_crypto_account_info_for_startup
Startup-only Crypto asset read. Unlike public/write paths, C++ startup can query before trade unlock and serializes a present but empty asset cipher.
query_crypto_cash_logs
Query crypto cash logs through CMD20632 for FTAPI Trd_FlowSummary.
query_crypto_history_order_fills
Query crypto history fills through CMD21234.
query_crypto_history_orders
Query crypto history orders through CMD20623.
query_crypto_max_buy_sell_qty
Query crypto max buy/sell quantity through CMD20622.
query_crypto_order_fees
query_crypto_order_fills
query_crypto_order_fills_for_startup
Startup-only current-fill read. CMD21237 carries the long account id but no cipher field; C++ permits this Login read before trade unlock.
query_crypto_order_info
Query crypto order details through CMD20625 and merge them into order cache.
query_crypto_order_related_fills
Query fills for one crypto order through CMD20624.
query_crypto_orders
query_crypto_orders_for_startup
Startup-only recent-order read. C++ permits this read before trade unlock; an empty cipher is omitted from CryptoMsgHeader while strict/write paths continue to require the cached cipher.
query_crypto_position_account_info
Query crypto positions through CMD20631.
query_crypto_trade_configs
Query crypto trade configs through CMD20102.
query_funds_sim
query_order_fill_info_strict_for_push_refresh
Match C++ CheckRspHeaderAndGetSvrRet response gating.
query_order_fills
query_order_fills_for_startup
Startup necessary-data read. A malformed, partial, or backend-error response must not be converted into an authoritative empty snapshot.
query_order_fills_strict_for_push_refresh
v1.4.106 codex 0932 F3 [P2]: strict 版 query_order_fills for push-refresh path.
query_order_info_strict_for_push_refresh
Strict order detail query for C++ push-refresh parity.
query_orders
query_orders_strict
v1.4.109: strict 版 query_orders for write/push safety paths.
query_orders_strict_for_push_refresh
v1.4.106 codex 0932 F3 [P2]: strict 版 query_orders for push-refresh path.
query_position_account_info
Query real-account positions through CMD3020 using the C++ PositionList request shape.
query_positions_sim
trade_query_command
try_order_fill_proto_to_info_like_cpp
Backend odr_sys_cmn::OrderFill -> OpenD cache/API OrderFillInfo.
try_order_fill_proto_to_info_with_jp_acc_type_like_cpp