Language bindings¶
All bindings expose the same core model: strategy callbacks, order emission, position queries. The API shape is the same across languages.
| Language | Guide | Reference |
|---|---|---|
| Python | Python | API reference |
| Node.js | Node.js | API reference |
| Codon | Codon | API reference |
| JavaScript (embedded) | JavaScript | API reference |
| C API | C API | reference |
Which one to use¶
Python is the easiest starting point for backtesting — the Engine class runs signal batches in parallel C++ threads with the GIL released. Node.js makes more sense if your infrastructure is already JS.
Codon has nearly identical syntax to Python but compiles to native code. Start with Python, switch to Codon if you need it.
The embedded JS binding runs QuickJS inside the C++ process — no separate Node.js runtime. Useful for scripted rules and backtesting where spinning up an external runtime isn't practical.
For other languages, use the C API.
AI-agent companion¶
flox-mcp is a Model Context
Protocol server. AI coding agents (Cursor, Claude Code, Cline) spawn
it locally and ask it about FLOX before generating code. It exposes
tools that resolve a symbol across bindings (lookup_symbol),
enumerate one binding's exports (list_bindings), return a starter
strategy class that parses + validates (scaffold_strategy), pull
example code from the docs corpus (get_example), and search the
docs (docs_search). The package version is bumped in lockstep with
flox-py and the npm package, so the agent's view of the surface
matches what you installed. Setup is in
the package README.