Failed to place market order. Error: 'Spot' object has no attribute 'newOrderTest'
Failed to place market order. Error: 'Spot' object has no attribute 'newOrder' also not working.
from mexc_sdk import Spot
Initialize the MEXC client with your API credentials
For example,
try:
if trade_id is not None:
sell_order_response = client.newOrderTest(symbol=symbol, side='SELL', orderType='MARKET', options={'quantity': initial_quantity})
sell_order_id = sell_order_response['orderId']
logger.info("Market sell order placed successfully. Order ID: %s", sell_order_id)
Failed to place market order. Error: 'Spot' object has no attribute 'newOrderTest' Failed to place market order. Error: 'Spot' object has no attribute 'newOrder' also not working.
from mexc_sdk import Spot
Initialize the MEXC client with your API credentials
client = Spot(api_key=api_key, api_secret=api_secret)
For example, try: if trade_id is not None: sell_order_response = client.newOrderTest(symbol=symbol, side='SELL', orderType='MARKET', options={'quantity': initial_quantity}) sell_order_id = sell_order_response['orderId'] logger.info("Market sell order placed successfully. Order ID: %s", sell_order_id)