AdaptableTools / ballast-trading-poc

0 stars 0 forks source link

"Enabled" Parameter #10

Closed BallastDevelopment closed 2 years ago

BallastDevelopment commented 2 years ago

Enabled is a parameter that is used for each Key.   Example message*: {"MessageType":"DATA_UPDATE","Version":1,"DataType":"STRATEGY_PARAMS","Key":"QUOTING.BITFINEX.TESTBTC:TESTUSD.SELL.1","Name":"Enabled","Type":"bool","value":1}

(This will potentially be just a placeholder as we nail down how we want to display enabled status it gets complicated with the multiple levels that exist for each key.) But, let's make a column, that will be a for the "Enabled" parameter. The cell for each row, will be drop-down checklist that will display with a checkbox whether the instrument is enabled or not. And the setting can be changed by checking/unchecking it.

A drop-down check box that looks something like this: image For now, let's do this for just the two sides (Buy and Sell) of Auto-Eye, and two sides (Buy and Sell) of Level 1 of Quoting.

*The example message above is from an sample received message. For sending/changing the value of the "Enabled" parameter from the UI, the following message format works successfully (which is slightly different):
{ "MessageType" : "DATA_UPDATE", "Version" : 1, "DataType" : "STRATEGY_PARAMS", "Key" : "QUOTING.BITFINEX.TESTBTC:TESTUSD.SELL.1", "Name" : "Enabled", "Type" : 0, "Value" : "false" }

I've asked the developer that made the decoding/encoding library to check if this is an issue/error in the library, or an inconsistency from vendor side.

andreifloricel commented 2 years ago

In standby until the requirement is clarified & stable.

BallastDevelopment commented 2 years ago

There was a bug on platform/server side, which has now been resolved.
To change the Enabled parameter this message format should be used: { "MessageType" : "DATA_UPDATE", "Version" : 1, "DataType" : "STRATEGY_PARAMS", "Key" : "QUOTING.BINANCE.btcusdt.BUY.1", "Name" : "Enabled", "Type" : 1, "Value" : 0

}

Separately, there was an issue related to encoding in previous library. Sending bool with previous library won't work.
I've attached an updated TopicPublisher.js file TopicPublisher.zip

andreifloricel commented 2 years ago

Implemented the Enabled Parameter as a ContextMenu which is available only on the Venue and Instrument columns: ballast-enable-disable

BallastDevelopment commented 2 years ago

The solution that was implemented to change enabled to disable and disabled to enabled, is very rough on the eyes.
I know you mentioned, the reason you did it that way was because there wasn't an existing component like the one I mocked up. What about the component used for filtering that's shown here?

https://blog.ag-grid.com/content/images/2021/03/laravel-blog-showcase.gif I found it here: https://blog.ag-grid.com/using-ag-grid-server-side-row-model-angular-laravel-mysql/

andreifloricel commented 2 years ago

I checked in another variation, using Adaptable ActionColumns

BallastDevelopment commented 2 years ago

Seems to be a bug with Sending some of these message. image

In this case, it was just the BUY side messages that were misformed. (wrong "Type") and misformed "Key". But I'm not sure it is specific to BUY. Earlier, saw instances where Sell side also did not work. And when I first tried it today, both Buy and Sell would work.

andreifloricel commented 2 years ago

Fixes & deployed, please close after testing it