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.14.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.14.0
File Size Uploaded Provenance Actions
fastmm_engine-0.14.0.tar.gz 8.3 MB Without provenance Details for fastmm_engine-0.14.0.tar.gz

Built distributions (wheels)

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

Total release size: 37.6 MB

Release files / fastmm_engine-0.14.0.tar.gz

Download URL fastmm_engine-0.14.0.tar.gz
Size 8.3 MB
Tags Source
SHA-256 checksum
How to use checksums
55ec392c5811f5de4fe8f0870ed23ee1565e13f864614d94db82eda69a51b757
BLAKE2b-256 checksum
How to use checksums
9e3c79f544f55403297bc316ab1741351f7e57bdee21b2fe07de582d72edc9e3
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.14.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.14.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 5.9 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
118e681ff8fb798d480e9b5bbb1608a54b9c3346647f0b2baab101e019ebd3d4
BLAKE2b-256 checksum
How to use checksums
c0dca151a8ffc49f8439f0fcbe39d8ffa612fcb07398f5d5d3759f0772d56b6c
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.14.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.14.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 5.9 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5224673af65707c0e8502b9e2a123189ddb31d6b85b24dce0793c8fc32ceb3a8
BLAKE2b-256 checksum
How to use checksums
773a9c67ec79c72699b34ff0eb8ebe7b9f7078e4cd1e1419a03cf2d9693d55f6
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.14.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.14.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 5.9 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5f960c2e2b8f2b5830d761c63fa8fe1482e6d6a358a18790ee8c3db5d6850da4
BLAKE2b-256 checksum
How to use checksums
399411d3819edf14d5dbec449b57f31760f6c896cc2a650c7eb6b75b3b40a0da
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.14.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.14.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 5.8 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
38ecb21e3229da492a28e97d61b7b293d7dfc524ae49e35296b50db6366a5abe
BLAKE2b-256 checksum
How to use checksums
aed6384e5b0daff04e9dba9c21e163aa622514e4ce12d850ae778e8ea7d272b2
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.14.0-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.14.0-cp310-cp310-manylinux_2_28_x86_64.whl
Size 5.8 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
52d561a86df4e81dc7a4e5f41b39f38366012bc9c11a1984ad79994d1f968e1f
BLAKE2b-256 checksum
How to use checksums
4db4fe023f26a949288f9321d3f6d7f6381bcc42b4dfe4fced8f305bef52f4ed
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.14.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