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

Unify pricing information #171

Open
christroutner opened this issue Jan 15, 2020 · 4 comments
Open

Unify pricing information #171

christroutner opened this issue Jan 15, 2020 · 4 comments

Comments

@christroutner
Copy link

Here is the code controlling the price endpoint in BITBOX.

Seems Bitbox (and therefore Badger) are pulling from our price index at:
https://index-api.bitcoin.com/api/v0/cash/price/usd

While the new wallet is using the new markets API at,
https://markets.api.bitcoin.com/rates?c=BCH

causing slight price differences and confusion.

The scope of this issue is to:

  1. Determine what the right source of pricing information is.
  2. Implement that endpoint into the price endpoint for BITBOX.

What is the correct source of pricing information?

@BytesOfMan
Copy link

https://markets.api.bitcoin.com/live/bitcoin is used by the Bitcoin.com Universal Header.

Answering the original questions:

  1. The right source of USD spot information is https://markets.api.bitcoin.com/live/bitcoin
  2. This is what should be implemented in BITBOX

Additional background:

https://markets.api.bitcoin.com/rates?c=BCH is intended to be the correct source going forward, there is an open ticket to implement forex rates accessible by URLs (similar to index-api.bitcoin.com endpoint). So this URL and the data it accesses may change in the next couple of weeks.

If only USD rates are needed, this is a more manageable endpoint with the same (correct) information: https://markets.api.bitcoin.com/live/bitcoin

Unfortunately -- based on some quick testing, the two endpoints don't seem to update at exactly the same time.

@SpicyPete
Copy link

Hmm, forex rates are required to maintain current behavior.
Seems the rates? one may be the one needed, once it's stable.

@BytesOfMan
Copy link

This has been the issue preventing deprecation of index-api.bitcoin.com, since other tools also depend on its forex output.

@SpicyPete
Copy link

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

No branches or pull requests

3 participants