mmflow — Python SDK
Typed Python client for the mmflow market-data API: REST endpoints, SSE
streams, and a real-time WebSocket client. The REST + SSE surface is
standard-library only; the WebSocket client needs the ws extra.
pip install mmflow-sdk # REST + SSE (zero dependencies)
pip install "mmflow-sdk[ws]" # adds MmflowSocket (websockets)
The package name is mmflow-sdk; the import name remains mmflow.
REST + candles
from mmflow import MmflowClient
mm = MmflowClient()
# OHLCV history (normalized to {time, open, high, low, close, volume})
for c in mm.candles("BTC", interval="1m", hours=24):
print(c["time"], c["close"])
# Cross-venue open interest / funding / liquidations / whales
oi = mm.perps_oi(coins=["BTC", "ETH"], venues=["hl", "binance"])
for row in oi.data:
print(row["coin"], row.get("oiUsd"))
# Anything else under /api/v1:
resp = mm.get("/quant/density", {"coin": "BTC"})
SSE streams
for ev in mm.stream_trades("BTC"):
if ev.type == "trade":
print(ev.data["price"], ev.data["size"])
elif ev.type == "bye":
break
Real-time WebSocket
import asyncio
from mmflow import MmflowSocket
async def main():
sock = MmflowSocket(api_key="YOUR_KEY")
sock.subscribe("trades", "BTC", lambda payload, meta: print(meta["channel"], payload))
sock.subscribe("orderbook", "ETH", lambda payload, meta: print(payload))
await sock.run() # auto-reconnects; runs until close()
asyncio.run(main())
Channels: trades, orderbook, candles, liquidations, funding,
openInterest, markPrice, footprint. Auth, exponential-backoff
reconnect, and subscription replay are built in.
Metadata
Release files for mmflow-sdk 0.1.1
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 |
|---|---|---|---|---|
| mmflow_sdk-0.1.1.tar.gz | 5.9 kB | Without provenance | Details for mmflow_sdk-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mmflow_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for mmflow_sdk-0.1.1-py3-none-any.whl |
Total release size: 13.1 kB
Release files / mmflow_sdk-0.1.1.tar.gz
| Download URL | mmflow_sdk-0.1.1.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4dbdf548c091fc4de95fbcd44189f601cc0ff8d004e4bc2f3b37e08d8b17f9c0
|
|
BLAKE2b-256 checksum How to use checksums |
8eb784c82e51d40567d2ba80ab052c10307a86a66a50abcb815e71a9980b2519
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / mmflow_sdk-0.1.1-py3-none-any.whl
| Download URL | mmflow_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
acac0563b44c8f164a705b79d4cdb3f40bce0988acedf5102877f1e1122e78d0
|
|
BLAKE2b-256 checksum How to use checksums |
bb8e99e427874fd36e0e927fb691ce9eb3641bb79b7cae0b1bedb50573c42c70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for mmflow-sdk 0.1.1
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.