Skip to main content
Glama
README.md
[![CI](https://github.com/flox-foundation/flox/actions/workflows/ci.yml/badge.svg)](https://github.com/flox-foundation/flox/actions)
[![Docs](https://img.shields.io/badge/docs-site-blue)](https://flox-foundation.github.io/flox)
[![PyPI](https://img.shields.io/pypi/v/flox-py?v=1)](https://pypi.org/project/flox-py/)
[![npm](https://img.shields.io/npm/v/@flox-foundation/flox)](https://www.npmjs.com/package/@flox-foundation/flox)

## FLOX

FLOX is an AI-native framework for building trading systems.

Strategies, backtests, paper trading, and live execution sit behind one toolkit. AI agents discover the surface and drive it end-to-end through an MCP control plane. One strategy class runs backtest, paper, and live. Bindings for Python, Node.js, Codon, embedded JavaScript, and a stable C API.

Documentation is available at [flox-foundation.github.io/flox](https://flox-foundation.github.io/flox)

## Language bindings

| Language | Install | Docs |
|----------|---------|------|
| Python | `pip install flox-py` | [reference](https://flox-foundation.github.io/flox/reference/python/) |
| Node.js | `npm install @flox-foundation/flox` | [reference](https://flox-foundation.github.io/flox/reference/node/) |
| Codon | build from source | [reference](https://flox-foundation.github.io/flox/reference/codon/) |
| JavaScript (embedded) | bundled with C++ build | [reference](https://flox-foundation.github.io/flox/reference/quickjs/) |
| C API | `libflox_capi.so` | [reference](https://flox-foundation.github.io/flox/reference/api/capi/flox_capi/) |

All bindings expose the same strategy API, indicators, order books, backtesting, and data I/O. The C API is the integration point for adding support for any other language.

## AI companion

`flox-mcp` is a Model Context Protocol server that gives AI coding agents (Cursor, Claude Code, Cline) grounded access to the FLOX surface — symbol lookups across bindings, scaffolders, indicator and backtest tools, full-text doc search.

```bash
pip install flox-mcp
```

See [the package README](./mcp/README.md) for setup and the full tool list.

## Connectors

Native exchange connectors (Bybit, Bitget, Hyperliquid, Polymarket) live under [`connectors/`](./connectors/) and build with `-DFLOX_BUILD_CONNECTORS=ON`. The flag defaults to OFF so a backtest-only or research build doesn't pay the dependency cost. See the [connectors README](./connectors/README.md) for adapter notes and the optional Polymarket Rust toolchain step.

## Venue

Beyond trading on a market, FLOX can be one: the optional [`venue/`](./venue/) module adds a matching engine and the machinery around it, so many participants can trade against a single order book. See the [venue docs](https://flox-foundation.github.io/flox/venue/).

## Build options

The CMake options that gate every optional artefact (bindings, demo, tools, tests, benchmarks, connectors) are catalogued in [`docs/build/feature-flags.md`](https://flox-foundation.github.io/flox/build/feature-flags/). Defaults are OFF so a bare `cmake -B build` produces only the core C++ static library.

## Commercial Services

For commercial support, enterprise connectors, and custom development, visit [floxlabs.dev](https://floxlabs.dev).

## Contributing

Contributions are welcome via pull requests.
Please follow the existing structure and naming conventions.
Tests, benchmarks, and documentation should be included where appropriate.
Code style is enforced via `clang-format`. See [contributing guide](https://flox-foundation.github.io/flox/how-to/contributing/).

## License

FLOX is licensed under the MIT License. See [LICENSE](./LICENSE) for details.

## Disclaimer

FLOX is provided "as is" without warranty of any kind, express or implied.
The authors are not liable for any damages or financial harm arising from its use, including trading losses or system failures.
This software is intended for educational and research purposes. Production use is at your own risk.
See [DISCLAIMER.md](./DISCLAIMER.md) for full legal notice.

TDQS

A3.8/5.0

Scored across 38 tools

Disambiguation4/5

Most tools target a distinct resource and action, and pairs like validate_strategy/validate_strategy_no_lookahead and the AMM price/route/impact tools are clearly differentiated by name and description. A few discovery/guide tools (flox_overview vs flox_venue_guide, list_bindings vs list_capi_functions) overlap in purpose enough that an agent could select the wrong one without reading carefully.

Naming Consistency4/5

The dominant convention is clear snake_case verb_noun (list_*, get_*, cancel_*, set_*, validate_*, explain_*), which makes the surface predictable. It is not a perfect pattern: flox_overview/flox_venue_guide use a noun prefix, amm_price_impact lacks a verb, and whatif is a single bare word.

Tool Count2/5

38 tools is far above the comfortable agent-facing range and will force significant browsing even with categories. Some are tiny wrappers or no-arg guide tools that could be consolidated, so the count feels heavier than the scope requires.

Completeness4/5

The surface covers discovery/docs, strategy scaffolding and validation, backtesting/recording, AMM pricing/replay, and live engine inspection/control, so it has no major dead ends. Minor gaps remain: there is no per-strategy start/stop, no update_order, and account/balance state is not exposed.

Maintenance

ActivityActive
ResponsivenessWithin a week