BitgetLimited / v3-bitget-api-sdk

159 stars 161 forks source link

API Request Error(code=Please wait a moment) --> To fix it, what should I do? #33

Closed peacmake closed 1 year ago

peacmake commented 1 year ago

I have been using python-sdk-api well since a month ago. However, when I run place_order from 2 days ago, an error appears, but I don't know why. What should I do?


orderApi.place_order(symbol='ETHUSDT_UMCBL', marginCoin='USDT', size=1,side='open_short', orderType='limit', price='1650', timeInForceValue='normal')

/usr/local/lib/python3.8/dist-packages/bitget/mix/order_api.py in place_order(self, symbol, marginCoin, size, side, orderType, price, clientOrderId, timeInForceValue, presetTakeProfitPrice, presetStopLossPrice) 34 params["presetTakeProfitPrice"] = presetTakeProfitPrice 35 params["presetStopLossPrice"] = presetStopLossPrice ---> 36 return self._request_with_params(POST, MIX_ORDER_V1_URL + '/placeOrder', params) 37 else: 38 return "pls check args "

/usr/local/lib/python3.8/dist-packages/bitget/client.py in _request_with_params(self, method, request_path, params, cursor) 79 80 def _request_with_params(self, method, request_path, params, cursor=False): ---> 81 return self._request(method, request_path, params, cursor) 82 83 def _get_timestamp(self):

/usr/local/lib/python3.8/dist-packages/bitget/client.py in _request(self, method, request_path, params, cursor) 58 # exception handle 59 if not str(response.status_code).startswith('2'): ---> 60 raise exceptions.BitgetAPIException(response) 61 try: 62 res_header = response.headers

BitgetAPIException: API Request Error(code=Please wait a moment): Maybe something is wrong

doohun commented 1 year ago

update to new version

peacmake commented 1 year ago

Thank you ! As you mentioned, doing an API update solved it.

peacmake commented 1 year ago

Updating is solution