You are viewing a single comment's thread from:

RE: Hive's Internal Market UX is Absolute Trash. (and how to actually fix it)

in LeoFinance2 years ago

Could I get your help with something for my Lightning Hive bridge? I want to come up with a better way of getting a price for HBD than relying on Coingeko which I really don't trust.

Sort:  

You don't and you shouldn't! using pHBD wouldn't be bad, but the real way is....

average spread prices on internal market and divide it into price feed price of Hive.

(price feed HIVE)/[(internal market buy price + internal market sell price)/2]

Then please open this calc on an api so everyone can use it! I bet a few front ends would even throw a few bucks in for compute.

Is there a simple way to get the price feed average from the top witnesses? Guess I need to dig around in the api.

I must clean this part of my code up.

There is an api database_api.get_current_price_feed but have in mind that the price feed is not reported in real-time, so you cannot rely on it.

google only led me to tools that witnesses can use to manage their price feeds, but this must be being averaged internally for the conversion mechanics...

going to have to dig into the docs, I might have some time this week to lend a hand.