Search API Connector Documentation
Import Coinbase Data to Google Sheets
In this guide, we’ll walk through how to pull cryptocurrency market data from the Coinbase Digital Currency API directly into Google Sheets, using the API Connector add-on for Sheets.
Coinbase doesn’t provide that much data via these endpoints (other crypto APIs are generally better in that respect), but it is easy to use and useful for getting a comprehensive list of exchange rates in one go.
This article also includes a template to access private account data.
- Before You Begin
- Part 1: Create your API Request URL
- Part 2: Pull Coinbase API Data into Sheets
- Part 3: More Example Coinbase API URLs
- Part 4: Get Private Coinbase Account Data
- Part 5: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Create Your Coinbase API Request URL
We’ll first access the latest exchange rate data for Bitcoin.
- API root: https://api.coinbase.com
- Endpoint: /v2/exchange-rates
- Query String: ?symbol=BTC
Putting it together, we get the full API Request URL:
Part 2: Pull Coinbase API Data into Sheets
Now let’s get that data into Sheets.
- Open up Google Sheets and click Extensions > API Connector > Open.
- In the Create tab, enter the API URL we just created.
- Leave the OAuth and Headers sections empty. The market data part of the Coinbase API is public, so we don’t need any headers or other authentication.
- Create a new tab, and click Set current to use that tab as your data destination.
- Name your request, and click Run. A moment later you’ll see the latest exchange rate data for Bitcoin appear in your Google Sheet:
- If you’d like to see the data in columns instead of rows, create a second sheet and include the Sheets function
- If you only need some of those exchange rates, hit Edit Fields before running your request, and select just the fields you want to see in your sheet.
Part 3: More Example API URLs
Experiment with endpoints and query strings as described in the documentation to see other types of currency and crypto data from the API. For example, you can try the following URLs, one at a time (substitute in other currency symbols or dates, if you like).
- list of all currencies and corresponding symbols
- current spot price of any currency pair (the spot price is usually between the buy and sell price)
- historical price snapshot of currency pair at a specified date
Part 4: Get Private Coinbase Account Data
The above endpoints deal with public market data from the Coinbase API.
If you are instead a Coinbase customer looking to get API data from your own account, they require a more complex authentication process that includes generating a “signature”.
To access your private account data, please copy this sheet and follow the instructions within.
Part 5: API Documentation
Official API documentation: https://developers.coinbase.com/v2