Skip to main content

FastMM

CI Docs PyPI License

FastMM is a low-latency market-making engine. Read the documentation.

https://github.com/user-attachments/assets/dcd130c5-28fe-482f-a757-d0fc6550c5b9

Features

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

MIT

Metadata

Release files for fastmm-engine 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastmm-engine 0.11.0
File Size Uploaded Provenance Actions
fastmm_engine-0.11.0.tar.gz 8.1 MB Without provenance Details for fastmm_engine-0.11.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for fastmm-engine 0.11.0
File Actions
fastmm_engine-0.11.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.11.0-cp314-cp314-manylinux_2_28_x86_64.whl
fastmm_engine-0.11.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.11.0-cp313-cp313-manylinux_2_28_x86_64.whl
fastmm_engine-0.11.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.11.0-cp312-cp312-manylinux_2_28_x86_64.whl
fastmm_engine-0.11.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.11.0-cp311-cp311-manylinux_2_28_x86_64.whl
fastmm_engine-0.11.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.11.0-cp310-cp310-manylinux_2_28_x86_64.whl

Total release size: 34.1 MB

Release files / fastmm_engine-0.11.0.tar.gz

Download URL fastmm_engine-0.11.0.tar.gz
Size 8.1 MB
Tags Source
SHA-256 checksum
How to use checksums
3cf2909f905d7e56a3cf80808180e53c39e3051bafefc4ab963172814097df0c
BLAKE2b-256 checksum
How to use checksums
eeb53e746b99bd78c92f40360d408e87f4cfdb7fb1c6f887feaeee73bc2b9804
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.11.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.11.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 5.2 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7930bd8131d654c8cdd2a128e23c9ac16258f3ddf8b83bda965505d6b709122e
BLAKE2b-256 checksum
How to use checksums
1345fbde325569a2265a8568873faece846b320ba1ff18bc34ab1e6c952ec5b2
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.11.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.11.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 5.2 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c3b3435f245319b3a4a5e6574371510d5fb233f8441214a8cdf1bf88042299fd
BLAKE2b-256 checksum
How to use checksums
b4b82d33728b4572be3638c0d92cde488116735d68b9147c332ecc0672c5dfe9
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.11.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.11.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 5.2 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a6e39beb0c6d024ad6d26e996b8957bc26a9e2d556437f766d54f6fefb53dfec
BLAKE2b-256 checksum
How to use checksums
834f439d3a102ad4e1484f45e54104e1f9b32b0de60584da3eb0650f90d9fc4f
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.11.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.11.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 5.2 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e4d304e3dc723492dfcd9ae0f59c8b575565596954864438b5870a7418814742
BLAKE2b-256 checksum
How to use checksums
343e75792c8f43b97ca8ddfe5455522fcd0db2ce8c7791703f66577c21a0c825
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.11.0-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.11.0-cp310-cp310-manylinux_2_28_x86_64.whl
Size 5.2 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
dde6577ee81ba1c2135236bd15d153d3efc081c915107f3617d1637271189f47
BLAKE2b-256 checksum
How to use checksums
4512c387330944d9b72d86ff540988dfa7587ae2736a30c0e7ed66b1b25c50f9
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.11.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page