FastMM
FastMM is a low-latency market-making engine.
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
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+).
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.
Documentation
- Quickstart
- Quote on one exchange, hedge on another
- Account pools
- Low-latency TCP
- Run on a testnet or demo account
- Run in production
- How FastMM works
- How fast it is
- Benchmarks
Full documentation: https://ziy.bio/FastMM/
License
Metadata
Release files for fastmm-engine 0.4.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 | |
|---|---|---|---|
| fastmm_engine-0.4.0.tar.gz | 3.7 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| fastmm_engine-0.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| fastmm_engine-0.4.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.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| fastmm_engine-0.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| fastmm_engine-0.4.0-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 |
| fastmm_engine-0.4.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
Total release size: 20.1 MB
Release files / fastmm_engine-0.4.0.tar.gz
| Download URL | fastmm_engine-0.4.0.tar.gz |
|---|---|
| Size | 3.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7d404fbc07f292226609b252111ec58d82da8f8330406ca6588c634d100b9c4
|
|
BLAKE2b-256 checksum How to use checksums |
75896d59f2c900c50ef75b860cf131857e9aad136474f7a3bfffad69c93d1b72
|
| 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.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.4.0-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 |
7e2502b73234927a040c09e1411c36f8530df99a1b5dc9a0941719105479afc1
|
|
BLAKE2b-256 checksum How to use checksums |
79f11af744e89844577b8ef932e8f561b25b7b798b77d28afe351e192b8430be
|
| 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.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.4.0-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 |
502ea64a4883db0e0a2b26d91aac0e89022938b9ac4cf4ad29c5ab9143153413
|
|
BLAKE2b-256 checksum How to use checksums |
1f4b1b7d0e4bf5ce11bdc534367ab600cdd3900e8db7ece4031c863768b3507d
|
| 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.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.4.0-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 |
e2a8f939b754e13cc6de21718a2b420050dc0a18f96568bc547bb4e5c5e84426
|
|
BLAKE2b-256 checksum How to use checksums |
8a34dce91ea6d9323690bd435d386be057f26b727e5c0a95534459c8163aaac0
|
| 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.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.4.0-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 |
ceb0850b86d6cce03222860d9576c4e6626053d3e95b86c3ca71ef71726b359d
|
|
BLAKE2b-256 checksum How to use checksums |
43abb2486974c5782c47cf3f13a07085ec16d9a5fcaca5f3e36d5e2a6da6b844
|
| 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.4.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.4.0-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 |
ec7451ab801a066ea460d63011950684e4aba3e7bf77f6656c22671cfb67ad7b
|
|
BLAKE2b-256 checksum How to use checksums |
ff9e8ba8886441958daacbbc9995cb056e3481cf9bc3e8d3675f2781bd220904
|
| 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.4.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.4.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.9 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ff694d76daa9de8983637597ca6b24daaa53298c7614f82b801dbf08a7de89a3
|
|
BLAKE2b-256 checksum How to use checksums |
bb96de6c4464d1e0e78c008baccbd4c4996094e355f71fdb6f33e74267058bc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|