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.0.tar.gz
(68.3 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.0-py3-none-any.whl
(187.7 kB
view details)
File details
Details for the file typed_mexc-1.2.0.tar.gz.
File metadata
- Download URL: typed_mexc-1.2.0.tar.gz
- Upload date:
- Size: 68.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd23dc7609f51341ae7cf92ef4ca4ac9b3bf194890eab7c0657b4a13ae92fa38
|
|
| MD5 |
95a3db6ac8ac3d5d756558bc182e8b25
|
|
| BLAKE2b-256 |
95609f049a793a53db46894378a28105590561dec8eecc3a084d66a5eb9e2980
|
File details
Details for the file typed_mexc-1.2.0-py3-none-any.whl.
File metadata
- Download URL: typed_mexc-1.2.0-py3-none-any.whl
- Upload date:
- Size: 187.7 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 |
0bd7ec453eb7167a78d606399e0a5e9298d943aa7efb7679ee612a33b53b9c99
|
|
| MD5 |
3b6eb0ed4695f5a8930ce1e765b43162
|
|
| BLAKE2b-256 |
6bc79dd3e7c630d5fab4f6e543d0247fa1d12c0d3d173471e4ba208cdf0a29a7
|