maicoin 🪙¶
Python client for the MaiCoin MAX exchange. Provides a typed REST v3 client and a WebSocket stream client built on httpx, websockets, and pydantic.
✨ Highlights¶
- 🌐 REST v3 — typed wrappers over public and private MAX endpoints, with a raw
request()escape hatch. - 📡 WebSocket — subscription-based stream client with Pydantic-validated responses.
- 🔐 Auth helpers — nonce, payload encoding, and signature utilities for MAX private endpoints.
- 🐍 Modern Python — Python 3.12+, full type hints, ships
py.typed.
🚀 Quick start¶
from maicoin.ws import Channel, Stream, Subscription
stream = Stream()
stream.subscribe([Subscription(channel=Channel.TICKER, market="btcusdt")])
stream.add_handler(lambda r: print(r.model_dump(exclude_none=True)))
stream.run()
See the REST guide, the WebSocket guide, and the API reference.
📚 References¶
- HTTP API v3: https://max-api.maicoin.com/doc/v3.html
- WebSocket API: https://maicoin.github.io/max-websocket-docs/
- Source: https://github.com/narumiruna/maicoin