With Coinbase’s public API you can view the current buy price of your favorite cryptocurrencies on your dashboard.
Adding a Cryptocurrency Price Metric
In this example, we will be adding a metric for Bitcoin (BTC) price in USD.
- Click + at the top right of the Metrics menu.
- Choose the From a URL option.
- Give your Metric a Name.
- Paste and enter ‘https://api.coinbase.com/v2/prices/BTC-USD/buy’ into the URL section.
- Select the amount value.
- Click the Pinned switch and then click Save.
Adding/tracking different cryptocurrencies
To add and track a different cryptocurrency and/or the foreign currency that it displays in, just change the {cryptoSymbol} and {currencyCode} in the following URL:
https://api.coinbase.com/v2/prices/{cryptoSymbol}-{currencyCode}/buy
For example, the URL for Ethereum (ETH) in Canadian Dollars (CAD) would be:
https://api.coinbase.com/v2/prices/ETH-CAD/buy
- You can find supported crypto symbols on Coinbase’s website.
- You can find currency codes on xe’s website.
You may also be interested in...