Giter Site home page Giter Site logo

Comments (4)

0xMarsRover avatar 0xMarsRover commented on August 13, 2024

I met the same problem

from mexc-api-sdk.

gravisxv avatar gravisxv commented on August 13, 2024

@bachapk I have the same problem, can you please send the syntax you're using for limit orders? thx

from mexc-api-sdk.

fniko avatar fniko commented on August 13, 2024

You should validate first, whether market order is available for the used currency pair, using EP https://api.mexc.com/api/v3/exchangeInfo.

Example response

{
            "symbol": "NMRETH",
            "status": "ENABLED",
            "baseAsset": "NMR",
            "baseAssetPrecision": 2,
            "quoteAsset": "ETH",
            "quotePrecision": 6,
            "quoteAssetPrecision": 6,
            "baseCommissionPrecision": 2,
            "quoteCommissionPrecision": 6,
            "orderTypes": [
                "LIMIT",
                "LIMIT_MAKER"
            ],
            "quoteOrderQtyMarketAllowed": false,
            "isSpotTradingAllowed": true,
            "isMarginTradingAllowed": false,
            "quoteAmountPrecision": "0.001000000000000000",
            "baseSizePrecision": "0.01",
            "permissions": [
                "SPOT",
                "MARGIN"
            ],
            "filters": [],
            "maxQuoteAmount": "1000.000000000000000000",
            "makerCommission": "0",
            "takerCommission": "0.001",
            "quoteAmountPrecisionMarket": "0.001000000000000000",
            "maxQuoteAmountMarket": "1000.000000000000000000"
        },

from mexc-api-sdk.

dekacypher avatar dekacypher commented on August 13, 2024

I've also got the same problem and I've upgraded to the newest version through github.

Traceback (most recent call last):
  File "/path/to/main.py", line XX, in <module>
    main()
  File "/path/to/main.py", line XX, in main
    exchange_instance.buy()
  File "/path/to/mexcexchange.py", line XX, in buy
    res = self.client.new_order(symbol=self.coin_name, side="BUY", order_type="MARKET", options={"quoteOrderQty": self.funds})
  File "/path/to/mexc_sdk/__init__.py", line XXX, in new_order
    return typing.cast(typing.Any, jsii.invoke(self, "newOrder", [symbol, side, order_type, options]))
  File "/path/to/jsii/_kernel/__init__.py", line XXX, in wrapped
    return _recursize_dereference(kernel, fn(kernel, *args, **kwargs))
  File "/path/to/jsii/_kernel/__init__.py", line XXX, in invoke
    response = self.provider.invoke(
  File "/path/to/jsii/_kernel/providers/process.py", line XXX, in invoke
    return self._process.send(request, InvokeResponse)
  File "/path/to/jsii/_kernel/providers/process.py", line XXX, in send
    raise RuntimeError(resp.error) from JavaScriptError(resp.stack)
RuntimeError: Error: Server responded to [API_ENDPOINT] with status code 400:
{"msg":"api market order is disabled","code":30019}

from mexc-api-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.