Skip to main content

FastMM

CI Docs PyPI License

FastMM is a low-latency market-making engine for crypto exchanges. You write the quoting logic in Python or C++; FastMM runs it in backtests and live, quotes on one exchange and hedges on another, and recovers from crashes without losing track of a trade.

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

Exchange Markets Test environment
Binance spot, perpetual futures Binance Demo
OKX spot, perpetual futures OKX Demo
Bybit spot, perpetual futures Bybit testnet
Deribit options, futures Deribit testnet
Gemini spot, perpetual futures Gemini sandbox
Coinbase spot Coinbase Exchange sandbox

Documentation

Full documentation: https://ziy.bio/FastMM/

License

MIT

Metadata

Release files for fastmm-engine 0.3.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.3.0
File Size Uploaded
fastmm_engine-0.3.0.tar.gz 3.4 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for fastmm-engine 0.3.0
File
fastmm_engine-0.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
fastmm_engine-0.3.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.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
fastmm_engine-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
fastmm_engine-0.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
fastmm_engine-0.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details

Total release size: 18.7 MB

Release files / fastmm_engine-0.3.0.tar.gz

Download URL fastmm_engine-0.3.0.tar.gz
Size 3.4 MB
Tags Source
SHA-256 checksum
How to use checksums
7c7eef632d055942073badfbda5124436d795641ca6a245aa036c86cb77fa4bd
BLAKE2b-256 checksum
How to use checksums
1638dea5b164e98d659b7077c794b44a5f5c42de27bbcb43adacc464329451c1
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.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
dd4bdc4352e49d01acbbda285aff0144b6ad4fa0935523f3a7dc892319550418
BLAKE2b-256 checksum
How to use checksums
737ffad0d353d059acf344317b8a4757b62068c0c163f07ce1d80044d2cba969
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.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
57e3646543618d9e1abcf8a0b150807d5f42db6d2b5ad88487b1786ede0758f2
BLAKE2b-256 checksum
How to use checksums
321f9f0578f8510d5fb6ac198fdfd1a6b5da6dcc92e87b6ec5d83518ef5bae53
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.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2afc5b73677ba5f338b06f53528cfc6f4c817a4f0a942c9187a9a24c08ab8e0a
BLAKE2b-256 checksum
How to use checksums
70b9b6f2247c630d39aca5a5c701e6815e3b031725de23a4d13fc275f5d40123
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.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4217e16507bcff37a5c44a3b8150ebe7097185b0e9b93696a8038aca274c04f8
BLAKE2b-256 checksum
How to use checksums
a296c47b61317debabad1d1b0453548221b7b32fd2f327f6ea8dc0c1ce65951b
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.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
735227b9093ebff3dbdc6e5f9e40b89fab6da59ee8577840695e7bc0f32ec00c
BLAKE2b-256 checksum
How to use checksums
bb7161c224ec34a5920652313daf96b6eba0e98fbe1e541979c5bcec1933c7ff
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.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL fastmm_engine-0.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.9 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1a1f6a9f05477c399493a7d127511ae948ec4f42f7ea4595c95e36bf6e8e61ac
BLAKE2b-256 checksum
How to use checksums
bcbcfb1df6dd6887a13105a314b5320a268d0fc2baa311d84a1efdc5cd742601
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.6.0

6 release files

0.5.1

6 release files

0.5.0

6 release files

0.4.0

7 release files

This release

0.3.0 This release

7 release files

0.2.0

7 release files

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