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.12.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.12.0
File Size Uploaded Provenance Actions
fastmm_engine-0.12.0.tar.gz 8.2 MB Without provenance Details for fastmm_engine-0.12.0.tar.gz

Built distributions (wheels)

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

Total release size: 34.3 MB

Release files / fastmm_engine-0.12.0.tar.gz

Download URL fastmm_engine-0.12.0.tar.gz
Size 8.2 MB
Tags Source
SHA-256 checksum
How to use checksums
2ab12975f104a39da7e8793921f6e939f110bca87025a2934dde7b37f791cce6
BLAKE2b-256 checksum
How to use checksums
d4b489981bb7ee0cc163577090540d2ace03a9c51630db02829677868d0c07ad
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.12.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.12.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
902edb459a9b95a5376b17155fcf96e2237245675cb539364414894f57b5c785
BLAKE2b-256 checksum
How to use checksums
fab0f67f03779b84c49cd315c4348a863021db1a63a54a111b06c3ee454530e8
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.12.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.12.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
8279aad3d06e21b41df5fba12ebc4557c7276ee1ddf1807423b94180a45c20d8
BLAKE2b-256 checksum
How to use checksums
e062f7a72fe3160e8d7a7ec59afb17a9f08feeff3745b73f8f9e87a6de21f587
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.12.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.12.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
3fa49270dcb70c1ebabf0f949c4fbf756cfd52c73636e8a111d0f5abe7332fa4
BLAKE2b-256 checksum
How to use checksums
4ccfaebed249fb229084361839359350032fa118cc9593d7043e2823defcf05a
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.12.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.12.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
ab11ecdefa55c93433ea28bceaff34376be3775de982efcafe4e6c95fb70a04c
BLAKE2b-256 checksum
How to use checksums
c4b1c6b9ab1975333c649e7f7787fe87d612a76e08cb011820c02c8cfc355e07
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.12.0-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.12.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
dd856c2a878e19f78ae340949589c7477200e2379466b869cecc0124d5d24b6f
BLAKE2b-256 checksum
How to use checksums
8f5f2daa4ed366f10796a5340cde267e4df5e8156b67050f99a95c7d32a6a88a
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.12.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