frontend-monorepo
frontend-monorepo copied to clipboard
Improve display of price monitoring bounds
Story
As a console user I want see price monitoring bounds history in the candles chart So that I can learn how these evolved over time
Acceptance Criteria (Simplified approach)
Pennant
- [ ] Only show the next bound that will be hit (currently we show all)
Trading view
- [ ] Work out how to get this data into TV
- [ ] Work out how to display it
Sketch
Current state
Bounds are just straight lines and values displayed in the top left corner are either constant or disappear completely for all bounds when market is in auction:
Target
Bounds change and values change with time to accurately represent the historical values. When market is in auction only the bounds that were breached dissapear while others are still displayed.
Additional details / background info
Sort thorugh these to find the "nearest" one that will be triggered next
"priceMonitoringBounds": [
{
"minValidPrice": "339341",
"maxValidPrice": "351772",
"trigger": {
"horizon": "360",
"probability": "0.9999999",
"auctionExtension": "300"
},
"referencePrice": "345502"
},
{
"minValidPrice": "334929",
"maxValidPrice": "359920",
"trigger": {
"horizon": "1440",
"probability": "0.9999999",
"auctionExtension": "1800"
},
"referencePrice": "347207"
},
{
"minValidPrice": "330030",
"maxValidPrice": "373839",
"trigger": {
"horizon": "4320",
"probability": "0.9999999",
"auctionExtension": "3600"
},
"referencePrice": "351276"
},
{
"minValidPrice": "305593",
"maxValidPrice": "403821",
"trigger": {
"horizon": "21600",
"probability": "0.9999999",
"auctionExtension": "86400"
},
"referencePrice": "351410"
}
Was having a poke around on this last night ... I can see this history API.
https://vega-data.nodes.guru:3008/api/v2/market/data/e63a37edae8b74599d976f5dedbf3316af82579447f7a08ae0495a021fd44d13
Which it looks like we can query for given timestamps to / from and we will get every update of the market data from that time window.
https://vega-data.nodes.guru:3008/api/v2/market/data/e63a37edae8b74599d976f5dedbf3316af82579447f7a08ae0495a021fd44d13?startTimestamp=1712651714224286000
Would have to defer to @Matt on how useable that is within the context of the chart .... I wonder if a better solution here would be to request a new candle type for this.... how do we handle volume candles @Matt?
Covering this on #6290
We will not show the history ... but we will look at whether we can show the current bounds as a label.