ultrasoundmoney / frontend

ultrasound.money frontend
https://ultrasound.money
MIT License
216 stars 73 forks source link

[backend] Use Deribit for the price feed (https://test.deribit.com/api_console/?method=%2Fpublic%2Fget_index_price) and update every slot. #242

Open JustinDrake opened 2 years ago

JustinDrake commented 1 year ago

Another thing that would be great is to keep the values displayed in the tab header (see screenshot) significantly fresher.

I noticed that this Deribit tab keeps a fresh price value much longer than ultrasound.money.

Screenshot 2022-11-10 at 17 43 52
alextes commented 1 year ago

I'd break this work into two parts. First, start depending on Deribit for our ETH price feed instead of FTX. Second, change the frequency of the updates to every twelve seconds. Then there are extras that we can skip for now.

For part one:

For part two:

For part three (the stuff we can postpone indefinitely, nice to have):

alextes commented 1 year ago

Right, I'd put keeping the price fresh in the tab title in part three, or separate it out into a different issue. It has nothing to do with the price feed I believe, only with whether the browser keeps our JS running or not and how one can update a page title in the background reliably.