FastMM
FastMM is a low-latency market-making engine. Read the documentation.
If you are running FastMM on Binance, try bndesk, a real-time dashboard for your accounts.
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. Host and network tuning built in, such as core pinning and kernel bypass.
Quickstart
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.
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, OKX, Bybit, Gate, Deribit, Gemini and Coinbase. Nasdaq over TotalView-ITCH and OUCH 5.0.
License
Metadata
Release files for fastmm-engine 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fastmm_engine-0.5.1.tar.gz | 4.0 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| fastmm_engine-0.5.1-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.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| fastmm_engine-0.5.1-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.5.1-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.5.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
Total release size: 17.8 MB
Release files / fastmm_engine-0.5.1.tar.gz
| Download URL | fastmm_engine-0.5.1.tar.gz |
|---|---|
| Size | 4.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88ede0c833122b2e54f8ba4ac0ab5836a39952e630b297508f8f5956d3a664e5
|
|
BLAKE2b-256 checksum How to use checksums |
2fb83a9f4424cda18f69ced1f6fd05ce2da3f31d2507f949f8f1f2040356be53
|
| 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.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2e4917662847ca5f4b5ba1ae53d791ce9b49f06d08517fbc6733245e82a6e3fa
|
|
BLAKE2b-256 checksum How to use checksums |
0e1c076b31ef357cad122b3f9c4e4a2f6aae18013d767a07839489a0ef1e241a
|
| 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.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
98edd424fa7b30c6844bddaff212cb756b7a0b00db586265ed4afc72d2c9bf24
|
|
BLAKE2b-256 checksum How to use checksums |
42d59e5045b507e21d80e39038b1cfc06e7dfbf82951bad43335ee9105171248
|
| 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.5.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.5.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
25ca4ad4a750540608a0ef63ab16ae0ec17bb3ace60a771f593dde2b05979a78
|
|
BLAKE2b-256 checksum How to use checksums |
06de6c4b6d4a17d7f787c6c7532d659694888067d02667b219566ab561ab71a4
|
| 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.5.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.5.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
019dffe8a51898a1bb18f5d5692e7df9e83272f6f0fbe4181b555d254a6d8b54
|
|
BLAKE2b-256 checksum How to use checksums |
c3935b8c861646c44370a8e0490e529665846c99aecc6fbf2d803801a3d99a4f
|
| 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.5.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.5.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
307bfa09044f560737a1016d50996385d9414e7c926c1b2b951fa8746a19bcf9
|
|
BLAKE2b-256 checksum How to use checksums |
fbf90a5d26d2adefc02e5282d2b9cfff49ef494aa5bffca34e6ed88007373e8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|