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. - 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.7.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.7.0.tar.gz | 4.5 MB | Without provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| fastmm_engine-0.7.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.7.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.7.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.7.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.7.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: 19.6 MB
Release files / fastmm_engine-0.7.0.tar.gz
| Download URL | fastmm_engine-0.7.0.tar.gz |
|---|---|
| Size | 4.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbcc76b08d6d7c21ba8b1ccbf8c2034a8ddf800b315baae4a032a663d96bc345
|
|
BLAKE2b-256 checksum How to use checksums |
79ba32deb4c618a4a6609b1daabc7683fea2cd4eda6162aec6b69aad686cc1ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / fastmm_engine-0.7.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.7.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9cd7d6f2611beb0dc1ad192e8f5b20a425976174c5aec9dbd6766cac44261c4d
|
|
BLAKE2b-256 checksum How to use checksums |
9daba949ec9f5c69fe8e80f28f4798bc701b722947ab2b525ba5aa31bcfa54e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / fastmm_engine-0.7.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.7.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
fd34219fdde71ca79b1844cf8a179785c0b24e9b0c60f88cc0fe5eebaf862f29
|
|
BLAKE2b-256 checksum How to use checksums |
f6b498f1f17182f0767d6f10c54f0cb49a76a73707baa3a5d0eb85466fab99e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / fastmm_engine-0.7.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.7.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
5a42a95c9e100dc55437c25d5dba54b55c0ea776c45d5d4bfe0fd97c0fadd2bb
|
|
BLAKE2b-256 checksum How to use checksums |
5e02272228c12435a6507006f9802273e045d61a8cf35990d2755544999e1515
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / fastmm_engine-0.7.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.7.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
56a3611c8f25c336138d8f5814561d5207c5de3a790d4908acaccb845ea8edf7
|
|
BLAKE2b-256 checksum How to use checksums |
9a0c3ac5afc2cdfd2a78583279bd8c5bad2226e0b979ea9f1de5201921e8d1d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / fastmm_engine-0.7.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.7.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
24768f4e36367a4299772c26f745d4e7ae82dd8415597f6e70c30738c04e996b
|
|
BLAKE2b-256 checksum How to use checksums |
4d6077432de6981bc2690781e8288083080f302a978af3acc748eb0c055985ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for fastmm-engine 0.7.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.