FastMM
FastMM is a low-latency market-making engine. Read the documentation.
https://github.com/user-attachments/assets/dcd130c5-28fe-482f-a757-d0fc6550c5b9
Features
- Strategies in C++ or Python. Python hooks marked
@fastmm.hotcompile to machine code with Numba. - One strategy file for backtest and live. Replays are deterministic, and the simulated exchange models queue position.
- Account pools. Several sub-accounts trade behind one venue, and orders spread across them.
- Gateway. One
fastmm-gatewayholds the exchange connections; several strategy processes attach to it and can stop or restart without dropping them. - Live control.
fastmm-ctlchanges a running session's parameters without a restart. - A/B tests. Parameter sets run side by side, split by instrument, by time block or both, and are compared on markouts and net with paired intervals.
- Low-latency tuning. Core pinning, busy polling, and AF_XDP or DPDK receive for UDP multicast feeds. Order entry runs on the kernel TCP stack, which OpenOnload or XLIO can replace through
LD_PRELOAD.
Quickstart
The package on PyPI is fastmm-engine, imported as fastmm; pip install fastmm installs a different project.
python3 -m venv .venv && . .venv/bin/activate
pip install "fastmm-engine[hot]"
fastmm init my-mm && cd my-mm
python backtest.py
This runs a strategy on a simulated market, with no account and no API keys (Linux x86-64, Python 3.10+). On Debian and Ubuntu, sudo apt install python3-venv first; on macOS or Windows, run it in Docker. The quick start continues to a live session against the local simulated exchange; C++ strategies start from the C++ quick start.
A strategy
import fastmm
from fastmm import Param
class TouchMM(fastmm.Strategy):
half_spread_bps = Param(0.01, min=0.0, doc="half spread, bps")
quote_qty = Param(0.002, min=0.0, doc="size per side")
@fastmm.hot # compiled to machine code with Numba
def on_book(self, ctx, book):
if not book.valid:
ctx.pull()
return
half = book.mid * self.half_spread_bps * 1e-4
ctx.clear()
ctx.bid(book.mid - half, self.quote_qty)
ctx.ask(book.mid + half, self.quote_qty)
ctx.keep_passive()
Exchanges
Binance (spot and USDⓈ-M futures), OKX, Bybit, Gate, Hyperliquid, Lighter, Deribit, Gemini and Coinbase. A Nasdaq connector (TotalView-ITCH market data, OUCH 5.0 orders) trades only against the bundled simulator, fastmm-sim-itch.
If you are running FastMM on Binance, try bndesk, a real-time dashboard for your accounts.
License
Metadata
Release files for fastmm-engine 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fastmm_engine-0.8.0.tar.gz | 6.6 MB | Without provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| fastmm_engine-0.8.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| fastmm_engine-0.8.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| fastmm_engine-0.8.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| fastmm_engine-0.8.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| fastmm_engine-0.8.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
Total release size: 22.0 MB
Release files / fastmm_engine-0.8.0.tar.gz
| Download URL | fastmm_engine-0.8.0.tar.gz |
|---|---|
| Size | 6.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c501d3c52654937e840140bbd82fa17461cecfac46a283d14a3933823fa89e5
|
|
BLAKE2b-256 checksum How to use checksums |
1b695c7c31bb1fe13da92f93ade645c14a9404de96ea5bde1dd4dd3d7b20a466
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / fastmm_engine-0.8.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.8.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
a047d517398fb14e863b118f26f33ef57232eeaebd5ab0e410131c49dadaab84
|
|
BLAKE2b-256 checksum How to use checksums |
08f95c87d29e38d47e2eab14a045fb94246ebc0198321c5d23924c320761d905
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / fastmm_engine-0.8.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.8.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
aab8279a1daddfd00c96c85e293f346ee20da12f38e572df31d8cb22569f17f6
|
|
BLAKE2b-256 checksum How to use checksums |
0c40b31067b611cfe598f2451da40c1472980d623f273b075b0c0ec0a51bb273
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / fastmm_engine-0.8.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.8.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f30021283686f30de8d0a474de6b0f98886cf60d7539738cefcb2eb45012fc22
|
|
BLAKE2b-256 checksum How to use checksums |
baf57756145c5097c19adffd8cd4caad72a9eba2b87e806688a4086f03b1a449
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / fastmm_engine-0.8.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.8.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
23e8397fed0cc2cbad5e240ec01b38bdf8b70a4913aa41e85b0c338efb9aaad8
|
|
BLAKE2b-256 checksum How to use checksums |
b943a836597ab8ef7456d706c06a74e12232e71634665e527922fcf9f8347932
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / fastmm_engine-0.8.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.8.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
76661e201f8eb4a4f37056835491be3f3ebbed9b86f41b8371bb532b60f43650
|
|
BLAKE2b-256 checksum How to use checksums |
f608dcc4fcd91f9bdea48ef608f64e0b0074dbc55730c20b9dee368de880fb13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for fastmm-engine 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.