FastMM
FastMM is a low-latency market-making engine. Read the documentation.
https://github.com/user-attachments/assets/dcd130c5-28fe-482f-a757-d0fc6550c5b9
Features
- Low latency
- High-performance backtesting
- Cross-exchange market making
- One strategy for backtest, replay and live
- Multi-account trading
- Live A/B tests
Quickstart
python3 -m venv .venv && . .venv/bin/activate
pip install "fastmm-engine[hot]"
fastmm init my-mm && cd my-mm
python backtest.py
backtest py:MyMm seed=1 md_events=7149 steps=12428 wall=0.02s
net pnl -5.5272
realized / unrealized / fees 0.5198 / 0.0005 / 6.0475
fills (maker / taker) 1036 (1036 / 0)
...
This backtests a strategy on a simulated market; the Quick start goes on to a live session.
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
FastMM trades on Binance (spot and USDⓈ-M futures), OKX, Bybit, Gate, Hyperliquid, Lighter, Deribit, Gemini, Coinbase (Advanced Trade and Exchange) and, for US stocks, Alpaca (Venue connectors).
If you are running FastMM on Binance, try bndesk, a real-time dashboard for your accounts.
License
Metadata
Release files for fastmm-engine 0.13.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 | Actions |
|---|---|---|---|---|
| fastmm_engine-0.13.0.tar.gz | 8.2 MB | Without provenance | Details for fastmm_engine-0.13.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| fastmm_engine-0.13.0-cp314-cp314-manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64 | Details for fastmm_engine-0.13.0-cp314-cp314-manylinux_2_28_x86_64.whl |
| fastmm_engine-0.13.0-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details for fastmm_engine-0.13.0-cp313-cp313-manylinux_2_28_x86_64.whl |
| fastmm_engine-0.13.0-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details for fastmm_engine-0.13.0-cp312-cp312-manylinux_2_28_x86_64.whl |
| fastmm_engine-0.13.0-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details for fastmm_engine-0.13.0-cp311-cp311-manylinux_2_28_x86_64.whl |
| fastmm_engine-0.13.0-cp310-cp310-manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.28+ x86-64 | Details for fastmm_engine-0.13.0-cp310-cp310-manylinux_2_28_x86_64.whl |
Total release size: 36.1 MB
Release files / fastmm_engine-0.13.0.tar.gz
| Download URL | fastmm_engine-0.13.0.tar.gz |
|---|---|
| Size | 8.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
67e15da9be7055d96c1dbc04065103300e4b5a68c432957722d5404ebcc22516
|
|
BLAKE2b-256 checksum How to use checksums |
091a6e8ed414a0c128530afd1b91007201d9d7adbe2c90543e0dba2b35984c84
|
| 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.13.0-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.13.0-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.6 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
296d2a53763a2c9f217dda431bf83f811d95ee9a686d2f49d6b2961b9e540e80
|
|
BLAKE2b-256 checksum How to use checksums |
99f8575446807fe0b77d9c412db8b564a3c445cc561c46803435c86c02ff30cf
|
| 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.13.0-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.13.0-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.6 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
3817a54ea97af997ff157bf0288e2d328d006af9d9c57250bab3e407c23be64b
|
|
BLAKE2b-256 checksum How to use checksums |
b1aa6fcd7b7fac3c205c7b097b4bf699849a77c29de070c0882d38db2d2f5ff1
|
| 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.13.0-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.13.0-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.6 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b4a8b5caf20e9ac27f57b6fb7357140b20d175398f38ed063e4c6357a999af90
|
|
BLAKE2b-256 checksum How to use checksums |
d9ecd458d347bac31760bced732094e910ee748492d1a34acb14fcbe1a2be4a2
|
| 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.13.0-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.13.0-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.6 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b7ac3313df82e70ec5d5c8ae00336a95f9cb5dab1b18de9503cf9bb70be3fdde
|
|
BLAKE2b-256 checksum How to use checksums |
1cc4259c912431968151c4524e355644012c059c338770b57e67038f6caf9924
|
| 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.13.0-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | fastmm_engine-0.13.0-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.6 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
92fa67a428baf81e6a5a702c2de85849ea7affd3fbdb4ad9a7ca58aa4b19dc82
|
|
BLAKE2b-256 checksum How to use checksums |
b2d94ba5b7101150f9a04706225218e81539b1ef01b5716bb54dc91387a20772
|
| 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.13.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.