enarjord / passivbot_binance_isolated_margin_legacy

trading bot running on binance isolated margin
85 stars 31 forks source link

[Ask]: error with request binance "code":-1102 #10

Closed thorjeus closed 4 years ago

thorjeus commented 4 years ago

Hi,

After running quite well for about 2 weeks, suddenly i got this following error:

error with request binance {"code":-1102,"msg":"A mandatory parameter was not sent, was empty/null, or malformed."} Traceback (most recent call last): File "passivbot_isolated_margin.py", line 42, in tw return await fn(*args, **kwargs) File "/home/thorjeus/miniconda3/lib/python3.8/site-packages/ccxt/async_support/binance.py", line 2393, in request response = await self.fetch2(path, api, method, params, headers, body) File "/home/thorjeus/miniconda3/lib/python3.8/site-packages/ccxt/async_support/base/exchange.py", line 95, in fetch2 return await self.fetch(request['url'], request['method'], request['headers'], request['body']) File "/home/thorjeus/miniconda3/lib/python3.8/site-packages/ccxt/async_support/base/exchange.py", line 148, in fetch self.handle_errors(http_status_code, http_status_text, url, method, headers, http_response, json_response, request_headers, request_body) File "/home/thorjeus/miniconda3/lib/python3.8/site-packages/ccxt/async_support/binance.py", line 2387, in handle_errors self.throw_exactly_matched_exception(self.exceptions, error, feedback) File "/home/thorjeus/miniconda3/lib/python3.8/site-packages/ccxt/base/exchange.py", line 504, in throw_exactly_matched_exception raise exactstring ccxt.base.errors.BadRequest: binance {"code":-1102,"msg":"A mandatory parameter was not sent, was empty/null, or malformed."} () {'params': {'symbol': 'IOTABTC', 'isIsolated': 'TRUE', 'side': 'BUY', 'type': 'LIMIT', 'quantity': 21.0, 'price': 2.471e-05, 'sideEffectType': 'MARGIN_BUY'}}

Could you please help about what is caused on this?

Appreciate for your kind and help. Thanks & Regards.

thorjeus commented 4 years ago

Apologize. I re install this using new clone on this repo and everything is running well again. I have no idea where the errors came from :)

Thanks & Regards.

enarjord commented 4 years ago

hi, thanks for reporting the issue,

I got the same error a few days ago, did some troubleshooting and discovered that the parameter "timeInForce": "GTC" was not mandatory one day, then was mandatory the next day.

so I updated the code and looks like you recloned the repo after I did, so all good.

thorjeus commented 4 years ago

Thank you so much, What a beautiful work!