Skip to content

Unable to use the APIs to place order. #112

@acoderatwork

Description

@acoderatwork

When I execute the curl command or the nodejs API to place a new order, it succeeds for tokens like MXUSDT. But it fails for BTCUSDT.

curl command used with MXUSDT

curl -H "X-MEXC-APIKEY: $api_key" \
     -X POST "https://api.mexc.com/api/v3/order?$params&signature=$signature"

Result: success

When using the same curl command with BTCUSDT
result is {"code":10007,"msg":"symbol not support api"}

Similarly, when using the nodeJS API:

Success case (MXUSDT):

client = new Spot(API_KEY, API_SECRET);
 buyOrder = await client.newOrder("MXUSDT", "BUY", "LIMIT", {
        quantity: 10,  // Amount of BTC to buy
        price: 0.1  // Price of BTC in USDT
      });

Failure case: (BTCUSDT): Result : 'Bad Request':

client = new Spot(API_KEY, API_SECRET);
buyOrder = await client.newOrder("BTCUSDT", "BUY", "LIMIT", {
        quantity: 0.001,  // Amount of BTC to buy
        price: 84000  // Price of BTC in USDT
      })

Please let me know if the token BTCUSDT has to be enabled for my account to perform trading in mexc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions