A fully typed, validated async client for the MEXC spot and futures APIs.
- Documentation: https://mexc.tribulnation.com
- Source Code: https://github.com/tribulnation/mexc
from mexc import MEXC
async with MEXC.public() as client:
candles = await client.spot.market.candles(symbol='BTCUSDT', interval='1m', limit=5)
stream = await client.futures.streams.market.ticker('BTC_USDT')
print(candles[-1][4])
async for ticker in stream:
print(ticker['lastPrice'])
break
Why Typed MEXC?
- 🎯 Precise Types: Typed endpoint inputs and responses.
- ✅ Runtime Validation: Validated responses by default.
- ⚡ Async First: HTTP and WebSocket subscriptions.
- 📚 Full API Surface:
client.spot,client.futures, and stream groups for both spot and futures.
Installation
pip install typed-mexc
How To
- API Keys Setup
- Fetch Market Data
- Fetch Balances, Positions & History
- Place & Manage Spot Orders
- Listen To Streams
Reference
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
typed_mexc-1.2.2.tar.gz
(68.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
typed_mexc-1.2.2-py3-none-any.whl
(187.9 kB
view details)
File details
Details for the file typed_mexc-1.2.2.tar.gz.
File metadata
- Download URL: typed_mexc-1.2.2.tar.gz
- Upload date:
- Size: 68.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cda608454511fdd5669ae716816940f306eb883a7b0c4bea382b3efa38a52fca
|
|
| MD5 |
468c7d31118a6b1c6e0b3361b72feea5
|
|
| BLAKE2b-256 |
d970271046b0da8d52407e5f22c2c868a1f49ac0e9a55c19e613f68840a86816
|
File details
Details for the file typed_mexc-1.2.2-py3-none-any.whl.
File metadata
- Download URL: typed_mexc-1.2.2-py3-none-any.whl
- Upload date:
- Size: 187.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a9e8dbc75e0589627badb0d105a2f6f785dcc0438675b2c0a59d0290e3f8f9e
|
|
| MD5 |
256298ae52b568fd6955e33701e24817
|
|
| BLAKE2b-256 |
dd0b6ec972714db97281159d4b69908205fdf7a10724bd54f7f602163250966a
|