kucoin-python-sdk
kucoin-python-sdk copied to clipboard
{"code":"100003","msg":"Contract parameter invalid"}
Source
from kucoin.client import Trade
api_key = 'xxxxxx'
api_secret = 'xxxxxx'
api_passphrase = 'xxxxxx'
client = Trade(key=api_key, secret=api_secret, passphrase=api_passphrase, is_sandbox=False, url='https://api-futures.kucoin.com')
order_id = client.create_limit_order('GMT-USDT', 'sell', '5', '1.01')
print(order_id)
Log
C:\Users\MAX\Documents>python trade.py
Traceback (most recent call last):
File "C:\Users\MAX\Documents\trade.py", line 13, in <module>
order_id = client.create_limit_order('GMT-USDT', 'sell', '5', '1.01')
File "C:\Users\MAX\AppData\Local\Programs\Python\Python310\lib\site-packages\kucoin\trade\trade.py", line 99, in create_limit_order
return self._request('POST', '/api/v1/orders', params=params)
File "C:\Users\MAX\AppData\Local\Programs\Python\Python310\lib\site-packages\kucoin\base_request\base_request.py", line 99, in _request
return self.check_response_data(response_data)
File "C:\Users\MAX\AppData\Local\Programs\Python\Python310\lib\site-packages\kucoin\base_request\base_request.py", line 116, in check_response_data
raise Exception("{}-{}".format(response_data.status_code, response_data.text))
Exception: 200-{"code":"100003","msg":"Contract parameter invalid"}
This was related to the symbol name. It seems symbol names are different in FEATURES mode. I changed USDT to USDTM and the problem was fixed.
If you know why symbol names are different in the FEATURES and what mean USDTM and M please explain to me.
By the way, Thank you in advance.
Hello
That is right
We have different symbol names in future and spot.
Also the base currency, USDT is converted to USDTM
Please get the full info here:
https://docs.kucoin.com/futures/#get-open-contract-list
Also the base currency, USDT is converted to USDTM
Do you know what this abbreviation stands for? And what does M
mean? @progressivehed
It is just a naming to differentiate USDT name in spot from future
It is just a naming to differentiate USDT name in spot from future
Thanks, Future charts are not available in the trading view?
I cannot find USDTM charts in tradingview. But I see GMT-USDT (Kucoin) in tradingview. They are same or no?
No actually these namings are only inside Kucoin.
You can not find them on charting websites under those names (like tradingview)
In all charting websites, they have standard names universally. For BTC it is BTC-USDT perpetual contract .
So to summarize my answrr, thiese specific namings only belongs to Kucoin
No actually these namings are only inside Kucoin.
You can not find them on charting websites under those names (like tradingview)
In all charting websites, they have standard names universally. For BTC it is BTC-USDT perpetual contract .
So to summarize my answrr, thiese specific namings only belongs to Kucoin
Thank you for your answer. Does it's only related to naming or chart data is different too?
It is just about naming. Chart data are usually the same ( with slight delays)
Since this issue has already been addressed and there have been no updates for a long time, we will now close it. If you need any further assistance, feel free to ask!