Closed BallastDevelopment closed 2 years ago
Implemented & deployed
Instead of doing the aggregating of the Sell and Buy side on UI, this logic has been moved to back-end.
The name of the field passing the data is "Name":"AccumQty"
.
Below are example messages. Although the updates are coming to come from both SELL and BUY sides, we will only use the value for SELL side. (The values should be identical always, but we should simply use SELL side). There is no longer any need to aggregate or process the data other than displaying it in the grid.
{"MessageType":"DATA_UPDATE","Version":1,"DataType":"STRATEGY_DATA","Key":"AUTO_EYE.BITFINEX.TESTBTC:TESTUSD.SELL.1","Name":"AccumQty","Type":3,"Value":0.05630120999999987}
{"MessageType":"DATA_UPDATE","Version":1,"DataType":"STRATEGY_DATA","Key":"AUTO_EYE.BITFINEX.TESTBTC:TESTUSD.BUY.1","Name":"AccumQty","Type":3,"Value":0.05630120999999987}
Adjusted & deployed
We need to have two columns for Accumulated Quantity. On each row, 1 cell should be for AccumQty for AE, and 1 cell for AccumQty for Quoting. The cell is based on 'FilledQty' value. The AccumQty for AE should be aggregated from the 'FilledQty' value from the buy and sell side. This is the formula: AUTO_EYE...BUY.1 + (AUTO_EYE...SELL.1 * -1).
Same should be done for the BUY and SELL on for QUOTING.
Below is an example Snapshot data reply.
{"Key":"QUOTING.BITFINEX.TESTBTC:TESTUSD.SELL.1","NoValues":[{"Name":"Offset","Type":3,"Value":1},{"Name":"RejectCnt","Type":2,"Value":0},{"Name":"StrategyStatus","Type":0,"Value":"Inactive"},{"Name":"FilledQty","Type":3,"Value":0.06393768999999999}