# Comprehensive Broker Integration Test Configuration # # This configuration file provides test settings for validating # the real broker implementations in the Foxhunt HFT system. [test_environment] # Test environment settings name = "broker_integration_tests" log_level = "info" timeout_seconds = 30 retry_attempts = 3 graceful_failure = true # Allows tests to pass gracefully when brokers unavailable [interactive_brokers] # Interactive Brokers TWS/Gateway test configuration enabled = true # Connection settings (override with environment variables) host = "127.0.0.1" port = 7497 # Paper trading port client_id = 1 connection_timeout_secs = 10 request_timeout_secs = 5 heartbeat_interval_secs = 30 max_reconnect_attempts = 2 paper_trading = true # Always use paper trading for tests # Test account settings (use environment variables for real values) # FOXHUNT_IB_ACCOUNT_ID=DU123456 # FOXHUNT_IB_HOST=localhost # FOXHUNT_IB_PORT=7497 # FOXHUNT_IB_CLIENT_ID=1 [icmarkets] # ICMarkets FIX 4.4 test configuration enabled = true # FIX connection settings fix_endpoint = "demo1.p.ctrader.com" fix_port = 5034 sender_comp_id = "FOXHUNT_TEST" target_comp_id = "ICMARKETS" rest_base_url = "https://api-demo.ctrader.com" rate_limit_per_minute = 60 # Authentication (use environment variables for real values) # FOXHUNT_IC_USERNAME=your_demo_username # FOXHUNT_IC_PASSWORD=your_demo_password # FOXHUNT_IC_ACCOUNT_ID=your_demo_account [test_orders] # Test order configurations for validation [[test_orders.equity]] symbol = "AAPL" side = "Buy" quantity = 100 price = 150.50 order_type = "Limit" [[test_orders.equity]] symbol = "MSFT" side = "Sell" quantity = 50 price = 300.25 order_type = "Limit" [[test_orders.equity]] symbol = "GOOGL" side = "Buy" quantity = 10 price = 2500.00 order_type = "Limit" [[test_orders.forex]] symbol = "EURUSD" side = "Buy" quantity = 100000 # 1 lot price = 1.1250 order_type = "Limit" [[test_orders.forex]] symbol = "GBPUSD" side = "Sell" quantity = 50000 # 0.5 lot price = 1.2750 order_type = "Limit" [[test_orders.forex]] symbol = "USDJPY" side = "Buy" quantity = 100000 # 1 lot price = 149.50 order_type = "Limit" [performance_benchmarks] # Performance expectations for broker operations max_connection_time_ms = 10000 max_order_submission_latency_us = 50000 # 50ms max_order_ack_latency_us = 10000 # 10ms max_end_to_end_latency_us = 100000 # 100ms min_throughput_orders_per_second = 10 [failover_scenarios] # Failover test scenarios primary_broker = "interactive_brokers" secondary_broker = "icmarkets" failover_threshold_ms = 1000 max_failover_time_ms = 5000 health_check_interval_secs = 5 [mock_settings] # Mock broker settings for testing when real brokers unavailable enable_mocks = true mock_latency_ms = 50 mock_success_rate = 0.95 # 95% success rate mock_partial_fill_rate = 0.1 # 10% partial fills [validation_rules] # Validation rules for broker integration tests require_real_connection = false # Set to true to require actual broker connections allow_paper_trading_only = true validate_execution_reports = true validate_position_tracking = true validate_order_modifications = true validate_order_cancellations = true [logging] # Test logging configuration enable_detailed_logging = true log_broker_messages = true log_performance_metrics = true log_error_details = true output_directory = "test_logs"