Skip to main content

The unofficial MEXC API SDK, by Tribulnation. Compatible with Trading SDK.

Project description

MEXC Trading SDK

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

Python 3.10+ License

Read the docs

Quick Start

pip install mexc-trading-sdk
from mexc import MEXC

async with MEXC.new(API_KEY, API_SECRET) as client:
  r = 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

Authentication

Get your API keys from the MEXC dashboard.

Or, you can use public methods:

from mexc.spot import MarketData

async with MarketData() as client:
  candles = await client.candles('BTCUSDT', interval='15m')

Supported APIs

The SDK covers the following MEXC endpoints:

Spot

Trading

User Data

Market Data

Wallet

Public Streams

User Streams

Futures

Trading

Has been "under maintenance" (see the docs) for years. I.e., they don't want you to trade futures via the API, sorry.

Market Data

User Data

User Streams

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mexc_trading_sdk-0.1.9.tar.gz (46.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mexc_trading_sdk-0.1.9-py3-none-any.whl (105.7 kB view details)

Uploaded Python 3

File details

Details for the file mexc_trading_sdk-0.1.9.tar.gz.

File metadata

  • Download URL: mexc_trading_sdk-0.1.9.tar.gz
  • Upload date:
  • Size: 46.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for mexc_trading_sdk-0.1.9.tar.gz
Algorithm Hash digest
SHA256 915c799bab80801dbc3ff5b4b1c22e3064c44e24433411d86d6f930774e01081
MD5 38b1ccf83a4d98d74951c074c40812c1
BLAKE2b-256 607b132541fdf88eab2540136df7cf01eadc097b8961b5d10cfc2bba719320c0

See more details on using hashes here.

File details

Details for the file mexc_trading_sdk-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for mexc_trading_sdk-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 fd35a74ecaca5c651eefce24bdf31f7a082c5dadf2e9db71b46c1272b6373455
MD5 6dc8192a71e9389e6272d9a552249f15
BLAKE2b-256 4917d44ad1a6c7049ed9779eb8f16a3139e99e7a8eafe890765ef8f063edb1f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page