Closed rush0815 closed 1 year ago
Great on the error handling, but have we found out why this is happening? @Bennch mentioned his happens with new API keys?? I asked is this because no order history exists on the api key it will return no data because it does not have an entry in their DB yet? maybe we need to look for this order and open and close a min position on BTC to create the entry for them on new accounts?
I never had any problems by changing the API key. From your statement I gather that the orders are referenced to the API key. I don't know but that sound strange. The keys have relations to the useraccount. So it should not matter if you use a new one or not. The error @Bennch get looks like a timing issue (recv_windows=5000)? Bybit API says error 10003 = invaid API key. Thats not the case here. 10004 = signing error = API key is correct. So there must be another reason. Timout sound plausible for me.
My intention was to integrate the error handling so that the user out there can tell the correct error code for better debugging. The modification prints the API errorcode and ret_msg to console.
Returncode will be checked; bot will shut down if an error occures