question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MEXC market orders not supported

See original GitHub issue
import ccxt
mexc = ccxt.mexc({'apiKey': '...', 'secret': '...'})
exchange.createMarketBuyOrder('TRX/USDT', 1)

results in:

raise InvalidOrder(self.id + ' createOrder() does not support ' + type + ' order type, specify one of LIMIT, LIMIT_ORDER, POST_ONLY or IMMEDIATE_OR_CANCEL

However MEXC API does support market orders. Issue present in CCXT 1.78.43

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kroitorcommented, Jun 28, 2022

“BadRequest mexc3 {“msg”:“api market order is disabled”,“code”:30019}”

That error message is coming from the exchange directly (not from CCXT).

Apart from the support on the CCXT side, those market orders also have to be enabled on the exchange side. In this case they are disabled for your symbol, or maybe for all symbols. I’d suggest asking MEXC about it.

1reaction
carlosmieicommented, Jun 28, 2022

Hello @bachapk,

We’ve decided to add the v3 in a separate class called Mexc3, if you want to use it just instantiate mexc3 instead of mexc image

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Place Different Types of Orders - MEXC Learn
A market order is an order to be executed immediately at current market prices. Traders use this order type when speed is prioritized...
Read more >
How to Place Different Types of Orders - MEXC Blog
A market order is an order to be executed immediately at current market prices. Traders use this order type when speed is prioritized...
Read more >
Order Types - Announcement - MEXC
The market order guarantees the execution of orders but not the execution price as it may fluctuate depending on market conditions.
Read more >
MEXC to Disable The API Trading Function of 5 Perpetual ...
After disabling, users will no longer be able to use the API trading function to place orders for the above trading pairs.
Read more >
Market Orders Now Available for Major Trading Pairs on ...
Market Orders Now Available for Major Trading Pairs on MEXC (Web) · Market orders are executed at the current optimal market price as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found