Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Issue! Failed to place market order. Error: 'Spot' object has no attribute 'newOrderTest' #73

Open
lioneltan opened this issue Apr 27, 2024 · 1 comment

Comments

@lioneltan
Copy link

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)

@mncrftfrcnm
Copy link

mncrftfrcnm commented May 17, 2024

hey, try this:
client.new_order_test().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants