makarworld / pymexc

Unofficial python library for interacting with the MEXC crypto exchange
https://pypi.org/project/pymexc/
MIT License
34 stars 15 forks source link

Signature verification failed on futures api #6

Closed Mackming closed 10 months ago

Mackming commented 10 months ago

On all the Get requests, signature verification succeeds, but when any post request is sent, signature verification fails. Any solution?

makarworld commented 10 months ago

Provide some of your code for make requests.

imbashamba commented 10 months ago

same issue, here's my code

from pymexc import futures

api_key = ""
api_secret = ""

# initialize HTTP client
futures_client = futures.HTTP(api_key = api_key, api_secret = api_secret)

# make http request to api
print(futures_client.index_price("SOL_USDT"))
order = futures_client.trigger_order("SOL_USDT", 1, 3, 1, 92, 2, 1, 5, 1)
print(order)

output: {'success': True, 'code': 0, 'data': {'symbol': 'SOL_USDT', 'indexPrice': 95.639, 'timestamp': 1707240599818}} {'success': False, 'code': 602, 'message': 'Signature verification failed!'}

makarworld commented 10 months ago

Problem on MEXC futures api side. As moderators said (msg): "Futures not support api trading but still support query info".

You can ask about api in official MEXC api support chat -> t.me/MEXCAPIsupport