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 market data (other crypto APIs are generally better in that respect), but it is easy to use and can be a useful alternative to some of the more popular crypto APIs.
This article also includes a template to access private account data.
- Before You Begin
- Part 1: Pull Data from Coinbase into Sheets
- Part 2: Create a Custom Request
- Part 3: Get Private Coinbase Account Data
- Part 4: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Pull Data from Coinbase into Sheets
The easiest way to get started with the Coinbase API is through API Connector’s built-in integration.
- Select Coinbase from the drop-down list of applications
- Select an endpoint. These endpoints are all open so you don’t need an API key. For this example we’ll choose the
/prices/{currency_pair}/buy
endpoint, which provides the current buy price for a cryptocurrency. - This endpoint requires that we enter a currency pair. We'll use BTC-USD
- Choose a destination sheet, name your request, and hit Run. A moment later you'll see the response data in your sheet.
Part 2: Create a Custom Request
Alternatively, you can run your own custom requests instead of using API Connector’s pre-built integration, using any of the URLs shown in the API documentation. Here's an example:
- Application:
Custom
- Method:
GET
- Request URL:
https://api.coinbase.com/v2/prices/BTC-USD/buy

Part 3: 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 4: API Documentation
Official API documentation: https://developers.coinbase.com/v2
Im going to try this. I need to see how good or badly I've done this year. De-fi......
haha, good luck!
It would be nice to get additional information on syntax for Coinbase Pro.
Thanks for the suggestion. I don't have a Coinbase Pro account myself to test with, but after checking the docs I think the biggest challenge will be with adding in the signature they describe here: https://docs.pro.coinbase.com/#signing-a-message. You'd need some custom code for that.
Update: You can use this sheet to connect to your private Coinbase account data: https://docs.google.com/spreadsheets/d/1mA31i-4E9yKQJ9rWBaICQBPesGfaGpazX6rZBz9JHqs/copy#gid=1147903952
I’m not able to generate a spot price between two cryptocurrencies, like the current price from BTC to DOT for example.
Is this possible?
Yeah, their documentation isn't that clear on this point, but it seems the spot price endpoint only supports conversions to USD. But you could get this data by running
https://api.coinbase.com/v2/exchange-rates?currency=BTC
and finding the price of DOT within the response.can i also get my wallet balances using api?
Yes, you can use this sheet to connect to your private Coinbase account data: https://docs.google.com/spreadsheets/d/1mA31i-4E9yKQJ9rWBaICQBPesGfaGpazX6rZBz9JHqs/copy#gid=1147903952
Hello! I was wondering if it's possible to get 2 different currencies (let's say BTC and ETH) in one API GET request.
I've tried setting 2 API URLs on the same connector but it doesn't work. I've tried setting 2 different connectors but the first one deletes de second one when it gets refreshed =/
Hi Nelson, you can see Coinbase's documentation on this here: https://developers.coinbase.com/api/v2#get-spot-price
Based on that, they don't enable 2 different currencies at once, so you'd either need to use API Connector's multi-query functionality to make 2+ requests in a row, or you could just switch to a different crypto API that does let you get multiple currencies at once. For example, with Cryptocompare you'd make a request like
https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH&tsyms=USD
Thank you so much for this very useful tool. I've been following some crypto. Is there a way to display in a box the evolution of a crypto in percent for the last month? Always the evolution from a month from now to now.
Thank you!!
Max in Indonesia.
Sure, but Coinbase doesn't provide a lot of info so I'd use a different API for this. For example this API call to CoinMarketCap would give you 24h, 7d, 30d, 60d, and 90d percent changes for whatever coins you want:
https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=BTC
Hi, thanks for the info.
Do you know how connect to coinbase without addons. I mean, do you know how connect to coinbase from google sheet and get my wallet ?
I try to figure out....
If you Google "Coinbase apps script" or similar, you can find people who have written scripts to connect Sheets to Coinbase without add-ons. Or if you just want to get your private data, you can use this sheet.
Hello, really nice sheet it worked for me and I was able to get e. g. my user_id intro google sheets.
But is there an endpoint from coinbase with which I could import the total account balance, shown to me when I open the app, into google sheets?
Thanks a lot.
Sure, you can check their documentation for a list of all the data points they provide. I think this is what you're looking for:
https://api.coinbase.com/v2/accounts