Python API Reference¶
Complete reference for the flox_py Python module. All classes and functions are available directly from import flox_py.
Installation¶
Or build from source:
cmake -B build -DFLOX_ENABLE_PYTHON=ON -DFLOX_ENABLE_BACKTEST=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build
Modules¶
| Module | Description |
|---|---|
| Engine & Backtest | Backtest engine, signal creation, batch execution |
| Indicators | 20+ technical indicators (EMA, RSI, MACD, ATR, ...) |
| Aggregators | Bar aggregation (time, tick, volume, range, renko, Heikin-Ashi) |
| Order Books | NLevelOrderBook, L3OrderBook, CompositeBookMatrix |
| Profiles | Footprint bars, volume profile, market profile |
| Positions | Position tracking, group management, order tracking |
| Replay | Binary log reader/writer, market data recorder |
| Segment Ops | Merge, split, export, validate, partition data |
| Backtest Components | SimulatedExecutor, fills, trade records |
| Optimizer | Permutation test, correlation, bootstrap CI |
Conventions¶
- Prices and quantities are passed as
float64and converted to fixed-point (int64, scale 10^8) internally. - Timestamps are
int64nanoseconds. Millisecond and microsecond inputs are auto-detected and converted. - Numpy arrays are the primary data format. Structured arrays use packed C structs for zero-copy access.
- GIL release: All compute-heavy functions release the Python GIL for true parallelism.
- Raw values: Fields ending in
_raware fixed-point integers (value * 10^8). Divide by1e8to get floats.