Skip to content
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

Open
noshmody opened this issue Jan 7, 2020 · 16 comments
Open

Use a chain of coin pairs to derive USD/HBAR rate #91

noshmody opened this issue Jan 7, 2020 · 16 comments
Assignees
Labels
enhancement New feature or request

Comments

@noshmody
Copy link
Contributor

noshmody commented Jan 7, 2020

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/

@paulmadsenhed
Copy link

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

@lbaird
Copy link

lbaird commented Jan 7, 2020 via email

@paulmadsenhed
Copy link

paulmadsenhed commented Jan 7, 2020 via email

@lbaird
Copy link

lbaird commented Jan 7, 2020 via email

@paulmadsenhed
Copy link

Ok, will work on requirements.

@paulmadsenhed
Copy link

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.

@lbaird
Copy link

lbaird commented Jan 7, 2020 via email

@paulmadsenhed
Copy link

UpBit - has only HBAR-KRW
Okex - has HBAR-BTC but no pair with USD (fiat restrictions?)

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 ??

@lbaird
Copy link

lbaird commented Jan 7, 2020 via email

@paulmadsenhed
Copy link

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/

@lbaird
Copy link

lbaird commented Mar 6, 2020 via email

@hashgraph hashgraph deleted a comment from paulmadsenhed Mar 6, 2020
@lbaird
Copy link

lbaird commented Mar 6, 2020

I've now summarized this whole thread in the top comment.

@paulmadsenhed
Copy link

paulmadsenhed commented Mar 6, 2020 via email

@paulmadsenhed paulmadsenhed changed the title Add more exchanges for ERT USD-HBAR queries Use a chain of coin pairs to derive USD/HBAR rate Apr 8, 2020
@paulmadsenhed paulmadsenhed added the enhancement New feature or request label Apr 8, 2020
@paulmadsenhed
Copy link

paulmadsenhed commented Jan 9, 2021

@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

@lbaird
Copy link

lbaird commented Jan 9, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants