This document highlights key code sections that demonstrate the technical strengths and architectural patterns implemented in this FIX protocol trading bot.
RATU FIX Bot is a FIX protocol connector for Binance with defensive message parsing. The system demonstrates production-focused FIX protocol integration patterns including defensive parser modifications, ED25519 authentication, and three-session architecture.
File: Parser modifications
Lines: Defensive parsing logic
The system modifies the official Binance FIX SDK parser to handle malformed tag-value fields gracefully, skipping invalid fields and logging errors.
Why it's notable:
- Prevents crashes on malformed market data messages
- Skips invalid fields and continues processing
- Logs errors for debugging
- Graceful degradation when parsing fails
File: Authentication implementation
Lines: ED25519 signing logic
The system uses Ed25519 asymmetric cryptography for secure, non-expiring authentication, signing FIX logon messages with private key.
Why it's notable:
- Secure, non-expiring authentication
- Eliminates shared-secret risks
- Server verifies with public key
- Enables safer key rotation
File: Session management
Lines: Multi-session handling
The system manages three FIX sessions concurrently: Market Data (ticker streams), Order Entry (order placement), and Drop Copy (trade confirmations).
Why it's notable:
- Enables complete trading workflow
- Handles heartbeats and reconnections independently
- Thread-based receiver for non-blocking message reception
- Separate session management for each type
File: Trading strategy implementation
Lines: Market making logic
The system implements a spread market making strategy that places BUY and SELL orders at spread offset, using order.replace API for price chasing.
Why it's notable:
- Places orders at configurable spread offset
- Uses order.replace for aggressive price chasing
- Cancels and replaces stale orders
- Manages order lifecycle efficiently