Stage 3, day 19:
This starts to be a joke. Basic execution engine functionality is completed. I did meet few unexpected hurdles down the road.
2 of them are:
1. API documentation specify 2 optional fields allowing postpone order publication or set an expiry time for the order. Those functionalities simply didn't work and/or were only partially implemented. TBH, and I wasn't aware of that fact, the WebSocket API did only allow to place and cancel orders only since Feb 18 last month. Since the start of the project 3+ months ago, these 2 calls were in the documentation and I did simply assume that they were working. I'm lucky. They just happen to be available just in time when I'm ready to start using them. So the unexpected cost of that discovery is that I had to implement those missing functionalities in my client. Not rocket science but it cannot be done in few minutes neither. (I think that thing alone took about 3 days. As a side bonus, this has given me the opportunity to improve further the existing code as I spotted improvement opportunities as I was reworking the code for the new functionalities...)
2. I have discovered subtlety where the exchange various assets precision/decimals isn't the same as what can be stored in a double variable. Not sure exactly how they round the various values but I'm pretty sure that it is safe to assume that they pocket all the rounded fractions. So I truncate when an amount goes in my account and round the value to the next integer value above when I'm paying. Bottom line, they have an API call that gives you a JSON output with all the decimals for the 40+ supported assets. I need to write code to get that JSON file, process it and use the result in many locations in my code.
On top of that, now that I have a simple working execution engine, I need to add a new layer in it where it can execute a trade plan which consist of a sequence of orders. Again, I'm going to estimate that task to few hours so hopefully, it is going to be done either tonight or sometime tomorrow...
Building this thing is like trying to break a concrete dam with an ice pick. It looks like an impossible task but as soon as a hole is pierced, things should precipitate real quick eventually...
In terms of metrics... I'm now at ~45K line of code. Last time that I did measured that metric, it was on stage 3, day 6. So 5K lines in 13 days... About 400 lines/day... I have got more productive peaks in the past but I guess when you get close to the end and have few remaining though nuts to crack to complete, it is normal to experience a small slowdown...
but things still go in the right direction...
This starts to be a joke. Basic execution engine functionality is completed. I did meet few unexpected hurdles down the road.
2 of them are:
1. API documentation specify 2 optional fields allowing postpone order publication or set an expiry time for the order. Those functionalities simply didn't work and/or were only partially implemented. TBH, and I wasn't aware of that fact, the WebSocket API did only allow to place and cancel orders only since Feb 18 last month. Since the start of the project 3+ months ago, these 2 calls were in the documentation and I did simply assume that they were working. I'm lucky. They just happen to be available just in time when I'm ready to start using them. So the unexpected cost of that discovery is that I had to implement those missing functionalities in my client. Not rocket science but it cannot be done in few minutes neither. (I think that thing alone took about 3 days. As a side bonus, this has given me the opportunity to improve further the existing code as I spotted improvement opportunities as I was reworking the code for the new functionalities...)
2. I have discovered subtlety where the exchange various assets precision/decimals isn't the same as what can be stored in a double variable. Not sure exactly how they round the various values but I'm pretty sure that it is safe to assume that they pocket all the rounded fractions. So I truncate when an amount goes in my account and round the value to the next integer value above when I'm paying. Bottom line, they have an API call that gives you a JSON output with all the decimals for the 40+ supported assets. I need to write code to get that JSON file, process it and use the result in many locations in my code.
On top of that, now that I have a simple working execution engine, I need to add a new layer in it where it can execute a trade plan which consist of a sequence of orders. Again, I'm going to estimate that task to few hours so hopefully, it is going to be done either tonight or sometime tomorrow...
Building this thing is like trying to break a concrete dam with an ice pick. It looks like an impossible task but as soon as a hole is pierced, things should precipitate real quick eventually...
In terms of metrics... I'm now at ~45K line of code. Last time that I did measured that metric, it was on stage 3, day 6. So 5K lines in 13 days... About 400 lines/day... I have got more productive peaks in the past but I guess when you get close to the end and have few remaining though nuts to crack to complete, it is normal to experience a small slowdown...
but things still go in the right direction...