-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a chain of coin pairs to derive USD/HBAR rate #91
Comments
The current situation is that there are only 3 exchanges that have a USD-HBAR pair - Bittrex, Liquid and OKCoin - all of which the ERT alredy uses |
Interesting. I assume each of the 18 exchanges has USD-BTC and BTC-HBAR. Maybe we take the ratio?
|
That would allow us to add Binance, OKex, and UpBit as they all support HBAR/BTC and USD/BTC
|
Cool. And if they can tell us hbar volume, then we could do a weighted median.
|
Ok, will work on requirements. |
Actually, turns out that Upbit doesnt have an HBAR-BTC pair, and OKEX has only a BTC-USDT pair. So it would only be Binance that we could add to ERT using this ratio mechanism. |
Do Upbit and OKEX have a pair of HBAR with anything? Does that anything pair with USD?
|
UpBit - has only HBAR-KRW according to CMC, we have the following pairs to work with https://coinmarketcap.com/currencies/hedera-hashgraph/markets/ unless we contemplated HBAR -> BTC --> USDT --> USD ?? |
We could do HBAR -> BTC --> USDT --> USD. It’s an interesting question whether we get better answers doing that, or just excluding them entirely. Maybe excluding them is safer.
But if we ever do use a long chain like that, then the “volume” of the chain should be the minimum volume of all the pairs in the chain.
We also need to figure out which rate and volume to use with each exchange. I think Liquid has something like both “rate” and “rate_24”, and the latter was more accurate than the former in recent days. But I don’t know what they mean.
|
Note that Coinbase lists a HBAR/USD price for all exchanges, even those that dont directly offer that pair. So they must be doing the same sort of 'pair chaining'. https://coinmarketcap.com/currencies/hedera-hashgraph/markets/ |
For debugging and for testing, we should use that web page to check whether we’re getting close to the same answer they are for each exchange. It’s a nice check.
|
I've now summarized this whole thread in the top comment. |
ack
|
@lbaird if we relax the requirement that both pairs come from the same exchange, our options increase. For instance, pull HBAR/BTC from Binance, and BTC/USD from Coinbase (https://api.coinbase.com/v2/prices/BTC-USD/buy) we can calculate HBAR/USD . Once we have that BTC/USD price, we can use it for multiple other exchanges in the same manner and significantly expand our coverage |
That’s true. Or maybe USDT or other stable coins.
…________________________________
From: paulmadsenhed <[email protected]>
Sent: Saturday, January 9, 2021 5:39:17 AM
To: hashgraph/hedera-exchange-rate-tool <[email protected]>
Cc: Leemon Baird <[email protected]>; Mention <[email protected]>
Subject: Re: [hashgraph/hedera-exchange-rate-tool] Use a chain of coin pairs to derive USD/HBAR rate (#91)
@lbaird<https://github.com/lbaird> if we relax the requirement that both pairs come from the same exchange, our options increase.
For instance, pull HBAR/BTC from Binance, and BTC/USD from Coinbase we can calculate HBAR/USD .
Once we have that BTC/USD price, we can use it for multiple other exchanges in the same manner and significantly expand our coverage
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#91 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABDBYWY6VBARRUEYCFK5Y23SZA56LANCNFSM4KDNP4IA>.
|
if an exchange does not directly offer an hbar/usd pair, we can chain other pairs to derive an hbar/usd pair. For example, if the exchange offered a usd/btc pair and a hbar/btc, then dividing the second by the first would generate an equivalent usd/hbar pair.
Requirements for the chaining are here
https://hederatest.sharepoint.com/:w:/s/HederaHome/EfiCGVQQdX9PsRCdYupHIggBujOZqkyeX2L35k4vzRiJSg?e=DdCU2L
And during debugging, the answer from each chain can be compared to the numbers on this web page:
https://coinmarketcap.com/currencies/hedera-hashgraph/markets/
The text was updated successfully, but these errors were encountered: