Skip to content

aptyp4uk1337/mexc-api-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

188 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Python Node.js Go Rust Java C#

🔷 Unofficial MEXC API SDK

This is an unofficial MEXC API SDK with support for futures and spot trading, as well as many other methods, providing full trading and account access, even if some routes are marked as "Under maintenance".



🎖 Features

  • ⚡ Blazing fast (200 - 400 ms)
  • 🔐 No third-party requests
  • 🌐 Works on mainnet & testnet
  • 🔀 Support for batch requests
  • 🥷🏻 Multi-accounting and proxy support (HTTP/HTTPS/SOCKS5)
  • 🫂 Ability to work with multiple accounts at the same time
  • ⚙️ Compatible with any programming language
  • ⌨️ Simple PHP, Python, Go, Rust, Java & Node.js library

❓ FAQ

Does it fully support placing, cancelling, and tracking all types of futures orders?

  • Yes, including market, limit, stop-limit, and trigger orders.

How many orders can be sent per second, per minute, per day?

Can the bypass API fetch account info, open positions, and adjust leverage/margin?

Is the library provided as open source or as compiled/obfuscated code?

  • Currently, everything is open-sourced, nothing is obfuscated.

Can the library be used with multiple accounts, or is the authentication tied to a single one?

  • No limitation on number of accounts.

Does it use anything third-party to make those requests?

  • In the test version and subscription mode, all requests go through our server. When purchasing the source code, all requests go directly.

Will I get a risk control ban for using the library?

  • In my experience - no. For more information on risk control, see here 🛡️ Risk Control on MEXC.

⏱️ Rate Limit Test


💥 Node.js example

import { MexcBypass } from './MexcBypass.js';

const client = new MexcBypass('YOUR_MEXC_WEB_KEY', true, null);

try {
  const results = await client.batch({
    assets: () => client.getFuturesAssets({ currency: 'USDT' }),
    positions: () => client.getFuturesOpenPositions(),
    ticker_btc: () => client.getFuturesTickers({ symbol: 'BTC_USDT' }),
  });

  console.log('USDT Balance:', results.assets?.data?.availableBalance ?? 'N/A');
  console.log('Open positions:', results.positions?.data ?? []);
  console.log('BTC Price:', results.ticker_btc?.data?.lastPrice ?? 'N/A');

  const order = await client.createFuturesOrder({
    symbol: 'BTC_USDT',
    side: 1,
    type: 5,
    open_type: 1,
    vol: 1,
    leverage: 10
  });

  console.log('Order created:', JSON.stringify(order, null, 2));
} catch (error) {
  console.error('Error:', error);
}

📖 Available Methods

The library supports 50+ endpoints including:

  • Placing, modifying and canceling orders on spot and futures
  • Accessing wallet and asset data
  • Managing open positions, leverage and margin
  • Retrieving contract info and price feeds

📚 Full method documentation is available in /docs/methods/


▶ Live preview: placing and cancelling a futures order

mexc-futures-api-bypass.mp4

💌 Contact me

About

🔷 Unofficial MEXC API SDK - Get your access to MEXC Futures & Spot APIs during maintenance. PHP · Node.js · Python · Go · Rust · Java · C# libraries

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Contributors