Skip to content

MEXC Trading SDK

The unofficial, fully-typed async Python SDK for MEXC, by Tribulnation.

Python 3.10+ License

Quick Start

pip install mexc-trading-sdk
from mexc import MEXC

async with MEXC.new(API_KEY, API_SECRET) as client:
  candles = await client.spot.place_order('BTCUSDT', {
    'price': '50000',
    'quantity': '0.001',
    'type': 'LIMIT',
    'side': 'BUY',
  })

Why MEXC SDK?

  • 🚀 Fully Async - Built with httpx for high-performance async operations
  • 🔒 Type Safe - Complete type annotations with TypedDict and pydantic validation
  • âš¡ Easy to Use - Simple context-managed API with async with
  • 📊 Comprehensive - Spot trading, market data, wallet, and WebSocket streams
  • 🎯 No Setup Required - Start exploring markets immediately

What's Included

  • Market Data - Real-time prices, order books, and historical data
  • Spot Trading - Place, cancel, and query orders
  • User Data - Account balances, trade history, and order status
  • Wallet Operations - Deposits, withdrawals, and address management
  • WebSocket Streams - Live market data and user notifications

Next Steps