I’m looking to get an up-to-date ‘BTC-GBP’ price.
Running these API calls at the same time I get:
From the Prices Endpoint https://api.coinbase.com/v2/prices/:currency_pair/buy
— £14333.36
From the Buys Endpoint https://api.coinbase.com/v2/accounts/:account_id/buys
— £14334.02
They are within ~£1 of each other, an understandable discrepancy.
However at the same time these API calls are being run the UI on coinbase.com
is showing the price as £14270.19
a difference of ~£63 which is 0.45% lower.
I’ve measured this a few times and the difference varies between 0.4% and 0.7%
Why is there a difference? Surely all these prices should be exclusive of fees?
And how can I get an accurate price (which matches the UI) from the API?