Skip to content

FLOX

High-performance C++ framework for building trading systems.

GitHub License


Getting Started

Quickstart Build FLOX and run the demo in 5 minutes
First Strategy Write and run your first trading strategy
Architecture Understand how components work together
API Reference Complete technical documentation

Documentation

Section Description
Tutorials Step-by-step lessons for new users
How-To Guides Solutions for specific problems
Explanation Architecture and design concepts
Reference API specifications

Features

Feature Description
Lock-free event delivery Disruptor-style ring buffers for minimal latency
Zero-allocation hot path Pre-allocated pools, no heap allocation during trading
CPU affinity support Pin threads to isolated cores
Binary replay system Record live data, replay for backtesting
Type-safe primitives Strong types for Price, Quantity, SymbolId
Modular architecture Use only what you need

Requirements

Component Version
C++ Standard C++20
Compiler GCC 13+ or Clang 16+
Build System CMake 3.22+
Platform Linux (recommended)

Optional: LZ4 for log compression


Quick Example

#include "flox/strategy/istrategy.h"
#include "flox/book/event/trade_event.h"

class MyStrategy : public flox::IStrategy {
public:
    void onTrade(const flox::TradeEvent& event) override {
        if (event.trade.symbol == _targetSymbol) {
            processSignal(event.trade.price);
        }
    }

    void start() override { _running = true; }
    void stop() override { _running = false; }

private:
    flox::SymbolId _targetSymbol;
    bool _running = false;
};

Full tutorial →


License

MIT License