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.1.tar.gz
(68.5 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.1-py3-none-any.whl
(187.8 kB
view details)
File details
Details for the file typed_mexc-1.2.1.tar.gz.
File metadata
- Download URL: typed_mexc-1.2.1.tar.gz
- Upload date:
- Size: 68.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b64c34a6a44ce608fc6f9f89c7e8b577e68b8f2d864531a4c4aa5bc21e1fe659
|
|
| MD5 |
00f373031d0dceca0d70abdad5a4f904
|
|
| BLAKE2b-256 |
2cb40bde84d2a883e348d4dc05fd1513cdf792a8e1946c762846a67d46c83377
|
File details
Details for the file typed_mexc-1.2.1-py3-none-any.whl.
File metadata
- Download URL: typed_mexc-1.2.1-py3-none-any.whl
- Upload date:
- Size: 187.8 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 |
763b0525aaca90421dc47191616e57740f1e0ad061e548a38c683516705b69f8
|
|
| MD5 |
78884e55e3a17858785c76cda46841f0
|
|
| BLAKE2b-256 |
71c91af268ecff2c70489a54dddc858264639420cc1dde2d8abd68a4f8e97579
|