Stage 6, day 15:
Yesterday, the gym did reopen. Today, I'm rediscovering the satisfying feeling of sore muscles!
I pretty much completed the debug logs review. I have been able to make sense of all the observed problems. That was a very good feeling to isolate the problem issues out of a sea of numbers. I might have received help from BASE 'Be better with math' script!
I'm a bit concerned about 2 discoveries.
1. In few occasions, I did notice that the exchange was taking a bigger amount from the account than the advertised fee rate. This leads to "Insufficient funds" errors when my system try to use the balance that should be in the account based on the local fee calculation. (querying the exchange about the account balance between orders would unacceptably increase the system latency...)
2. They round more decimals than advertised in their doc (ie: use 8 decimals instead of 10) and they appear to pocket the difference (on top of the money they make out of the fees).
Currently, I have pending support ticket to get explanations about that.
Another bug occurrence that did bite me very nastily. A rare problem did throw an exception from the execution engine thread. The result of that was that the engine has been dead for days without me being aware of that. The effect of a dead engine is that there is no trade executed at all. I'm currently making sure that I detect this situation and shutdown the whole thing instead of creating a false impression that all is good. I'm also looking for ways make the code more robust instead of generating an exception. This is again an error returned by the exchange in response to a request that I did sent to them that did cause the exception on my side. I think that simply retrying the request 2-3 times before bailing out should be able to eliminate 99% of this rare exception...
As I was fixing all those things, another unexpected problem did pop out. I hate when service providers do that. Exchange did upgrade their API from version 1.0.1 to 1.1.0 without any prior notice and basically the new version is not preserving backward compatibility and did essentially broke my software.
At least, it doesn't appear to be a too big problem to modify the code but I still think that providing a short notice prior of the change would have been a nice gesture...
Yesterday, the gym did reopen. Today, I'm rediscovering the satisfying feeling of sore muscles!
I pretty much completed the debug logs review. I have been able to make sense of all the observed problems. That was a very good feeling to isolate the problem issues out of a sea of numbers. I might have received help from BASE 'Be better with math' script!
I'm a bit concerned about 2 discoveries.
1. In few occasions, I did notice that the exchange was taking a bigger amount from the account than the advertised fee rate. This leads to "Insufficient funds" errors when my system try to use the balance that should be in the account based on the local fee calculation. (querying the exchange about the account balance between orders would unacceptably increase the system latency...)
2. They round more decimals than advertised in their doc (ie: use 8 decimals instead of 10) and they appear to pocket the difference (on top of the money they make out of the fees).
Currently, I have pending support ticket to get explanations about that.
Another bug occurrence that did bite me very nastily. A rare problem did throw an exception from the execution engine thread. The result of that was that the engine has been dead for days without me being aware of that. The effect of a dead engine is that there is no trade executed at all. I'm currently making sure that I detect this situation and shutdown the whole thing instead of creating a false impression that all is good. I'm also looking for ways make the code more robust instead of generating an exception. This is again an error returned by the exchange in response to a request that I did sent to them that did cause the exception on my side. I think that simply retrying the request 2-3 times before bailing out should be able to eliminate 99% of this rare exception...
As I was fixing all those things, another unexpected problem did pop out. I hate when service providers do that. Exchange did upgrade their API from version 1.0.1 to 1.1.0 without any prior notice and basically the new version is not preserving backward compatibility and did essentially broke my software.
At least, it doesn't appear to be a too big problem to modify the code but I still think that providing a short notice prior of the change would have been a nice gesture...