FIX 4.0 Demo 1.0
Loading...
Searching...
No Matches
simulation_app.hpp File Reference

模拟交易网关 (Trade Gateway) More...

#include "fix/application.hpp"
#include "fix/session_manager.hpp"
#include "app/engine/matching_engine.hpp"
#include "app/manager/account_manager.hpp"
#include "app/manager/position_manager.hpp"
#include "app/manager/instrument_manager.hpp"
#include "app/manager/risk_manager.hpp"
#include <memory>
#include <unordered_map>
#include <mutex>
Include dependency graph for simulation_app.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  fix40::SimulationApp
 模拟交易应用层 More...
 
struct  fix40::SimulationApp::OrderMarginInfo
 订单保证金信息 More...
 

Namespaces

namespace  fix40
 

Detailed Description

模拟交易网关 (Trade Gateway)

提供一个线程安全的 Application 实现,作为交易网关:

  • 身份绑定:利用 FIX Logon 消息中的 SenderCompID 作为用户标识
  • 安全路由:强制使用 Session 绑定的 UserID 进行验资和下单
  • 协议扩展:支持 FIX User Defined Message (U系列) 实现自定义查询

集成以下模块:

  • AccountManager: 账户管理
  • PositionManager: 持仓管理
  • InstrumentManager: 合约信息管理
  • RiskManager: 风险控制
支持的消息类型
  • D: NewOrderSingle (新订单)
  • F: OrderCancelRequest (撤单请求)
  • U1: BalanceQueryRequest (资金查询请求) - 自定义
  • U3: PositionQueryRequest (持仓查询请求) - 自定义
发送的消息类型
  • 8: ExecutionReport (执行报告)
  • U2: BalanceQueryResponse (资金查询响应) - 自定义
  • U4: PositionQueryResponse (持仓查询响应) - 自定义