coinbase-spreadsheet
coinbase-spreadsheet copied to clipboard
Get bitcoin price in a Google spreadsheet
coinbase-spreadsheet
Get Coinbase bitcoin (sell/buy) price in a Google spreadsheet
-
Open the Google spreadsheet where you want to import the Coinbase price
-
Go to "Tools" --> "Script Manager". Click on "New" --> "Blank Project"
-
Replace:
function myFunction() { }with the code from 'coinbase_fetch.gs' (simply copy/paste it from 'coinbase_fetch.gs')
-
Change the following two variables:
var buy_price_cell = 'E4' var sell_price_cell = 'E3'and put the cells (from your Google spreadsheet) where you want the respective prices to appear e.g., 'A1', 'B4' etc.
-
Go to "File" --> "Rename" and in "Enter new project name" enter something like 'coinbase_price'
-
Go to "Resources" --> "Current project's triggers" --> and add a new trigger. In "Events" make it "Time-driven" and select the hours/minutes after which you want the price to refresh.
-
Google will say "Authorization required", give the script the required authorization to run.
-
Go back to your spreadsheet window and reload the 'Script manager', you should see the 'coinbase_price' script there now.
If you followed these steps correctly, you should now see the Coinbase buy and sell price appear in the cells you entered (in step 4).
If you have questions, contact Muneeb Ali