Skip to main content

Module trade_query

Module trade_query 

Source

Structs§

CryptoCashLogInfo
CryptoMaxBuySellQtyInfo
CryptoMaxBuySellQtyRequest
Query crypto max buy/sell quantity through CMD20622.
CryptoOrderFeeInfo
CryptoOrderFeeItem
OrderFillInfo

Enums§

TradeBackendChannel
TradeQueryBodyProto
TradeQueryOperation

Constants§

CMD_ACCOUNT_INFO
账户资产查询命令 ID (真实账户: 资金+持仓)
CMD_FUND_BOND_DETAIL_ASSET
基金/债券总资产查询命令 ID (真实账户 sidecar, C++ QueryFundNoLimit)
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 推导。
CMD_SIM_QUERY_ORDER_FILL_LIST
Sim 账户成交列表查询 CMD。显式登记,禁止调用点用 offset 推导。
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_deal_status_to_ftapi
backend_deal_status_to_ftapi — 对齐 C++ NN_DealStatus (NNBase_Define_Enum.h:377-381) + C++ NNProto_Trd_Deal.cpp:68-91 转换: is_cancelled=true → 1 (Cancelled), is_corrected=true → 2 (Changed), otherwise → 0 (OK).
backend_order_fill_qty_price_for_ftapi
Backend odr_sys_cmn::OrderFill -> FTAPI 对外 qty/price。
backend_order_status_to_ftapi
指定成交 ID 查询 (push NOTICE_TYPE_ORDER_FILL_UPDATE 路径).
backend_order_type_to_ftapi
Backend odr_sys_cmn::OrderType → FTAPI Trd_Common::OrderType.
backend_real_market_to_trd_market_like_cpp
create_backend_req_id
Create C++-shaped backend MsgHeader.req_id.
derive_backend_market_list
派生 backend 用的 market list: enabled_markets → 过 is_valid_trd_market(env, m)convert_trd_market_c2s(m).
hash_str_to_u64
C++ HashStrToU64 对齐实现,用于把 backend alphanumeric order/fill id 投影成 FTAPI uint64 orderID/fillID.
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
order_fill_info_cmd_for_env
order_fill_list_cmd_for_env
order_info_cmd_for_env
order_proto_to_cached_like_cpp
order_query_security_types_like_cpp
Security type list for order-list/history-order-list query body.
query_account_info
查询真实账户资金+持仓 (CMD 3020: AccountInfoReq)
query_crypto_account_info
Query crypto account funds through CMD20631.
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_order_fees
query_crypto_order_fills
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_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_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.