futu_backend/
trade_query.rs1use futu_cache::trd_cache::{
8 CachedCashInfo, CachedFunds, CachedMarketInfo, CachedPosition, TrdCache,
9};
10use futu_core::error::Result;
11
12use crate::conn::BackendConn;
13use crate::proto_internal::{
14 asset_pl, config_base, crypto_risk, crypto_risk_comm, inbound_oe, inbound_read,
15 mobile_fund_asset,
16};
17
18mod account_info;
19mod common;
20mod crypto_account;
21mod crypto_orders;
22mod orders;
23mod sim;
24
25pub use crate::trade_cmd::{
26 CMD_ACCOUNT_INFO, CMD_FUND_BOND_DETAIL_ASSET, CMD_QUERY_FUND,
27 CMD_QUERY_HISTORY_ORDER_FILL_LIST, CMD_QUERY_HISTORY_ORDER_LIST, CMD_QUERY_ORDER_FILL_INFO,
28 CMD_QUERY_ORDER_FILL_LIST, CMD_QUERY_ORDER_INFO, CMD_QUERY_ORDER_LIST, CMD_QUERY_POSITION,
29 CMD_SIM_QUERY_FUND, CMD_SIM_QUERY_HISTORY_ORDER_FILL_LIST, CMD_SIM_QUERY_HISTORY_ORDER_LIST,
30 CMD_SIM_QUERY_ORDER_FILL_INFO, CMD_SIM_QUERY_ORDER_FILL_LIST, CMD_SIM_QUERY_ORDER_INFO,
31 CMD_SIM_QUERY_ORDER_LIST, CMD_SIM_QUERY_POSITION, TRADE_QUERY_COMMANDS, TradeBackendChannel,
32 TradeQueryBodyProto, TradeQueryOperation, trade_query_command,
33};
34
35pub use account_info::{
36 Cmd3020QuoteLevel, query_account_info, query_account_info_after_trade_push,
37 query_position_account_info,
38};
39pub use common::{create_backend_req_id, hash_str_to_u64};
40pub use crypto_account::{
41 query_crypto_account_info, query_crypto_account_info_for_startup,
42 query_crypto_position_account_info,
43};
44pub use crypto_orders::{
45 CryptoCashLogInfo, CryptoMaxBuySellQtyInfo, CryptoOrderFeeInfo, CryptoOrderFeeItem,
46 query_crypto_cash_logs, query_crypto_history_order_fills, query_crypto_history_orders,
47 query_crypto_max_buy_sell_qty, query_crypto_order_fees, query_crypto_order_fills,
48 query_crypto_order_fills_for_startup, query_crypto_order_info,
49 query_crypto_order_related_fills, query_crypto_orders, query_crypto_orders_for_startup,
50 query_crypto_trade_configs,
51};
52pub use orders::{
53 CurrentOrderQueryResult, OrderFillInfo, backend_order_status_to_ftapi,
54 backend_real_market_to_trd_market_like_cpp, history_order_fill_list_cmd_for_env,
55 history_order_list_cmd_for_env, init_trade_data, is_valid_real_trd_market_like_cpp,
56 order_fill_info_cmd_for_env, order_fill_list_cmd_for_env, order_info_cmd_for_env,
57 order_proto_to_cached_like_cpp, query_order_fill_info_strict_for_push_refresh,
58 query_order_fills, query_order_fills_for_startup, query_order_fills_strict_for_push_refresh,
59 query_order_info_strict_for_push_refresh, query_orders, query_orders_strict,
60 query_orders_strict_for_push_refresh, try_order_fill_proto_to_info_like_cpp,
61 try_order_fill_proto_to_info_with_jp_acc_type_like_cpp,
62};
63pub use sim::{query_funds_sim, query_positions_sim};