Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamiew/crypto-price-data
Fetch crypto price data from Coingecko in a format suitable for use in a Google Spreadsheet (via `ImportJSON`)
https://github.com/jamiew/crypto-price-data
crypto google-sheets portfolio prices spreadsheets trackers
Last synced: 19 days ago
JSON representation
Fetch crypto price data from Coingecko in a format suitable for use in a Google Spreadsheet (via `ImportJSON`)
- Host: GitHub
- URL: https://github.com/jamiew/crypto-price-data
- Owner: jamiew
- Created: 2021-12-14T00:53:47.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T13:42:33.000Z (4 months ago)
- Last Synced: 2024-12-15T08:52:50.570Z (24 days ago)
- Topics: crypto, google-sheets, portfolio, prices, spreadsheets, trackers
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# crypto-price-data
Simple vanilla js script to download crypto price data from [Coingecko](https://coingecko.com)
Transforms it into a format that is designed to work well with the Google Sheets [ImportJSON](https://github.com/bradjasper/ImportJSON/blob/master/ImportJSON.gs) appscript.
## Usage
Edit the `symbols.txt` file and put in Coingecko-compatible ids, which come from their [coins/list API endpoint](https://api.coingecko.com/api/v3/coins/list).
90% of the time the id is the same as the slug of their token urls, like ["ethereum"](https://www.coingecko.com/en/coins/ethereum),
but not always. Unfortunately I haven't found a good way to predict when it's not.Then run the script. To import it into Google Sheets it needs to be publicly accessible,
so you could run it on public-facing web server, or save it to a [gist](https://gist.github.com) or [val](https://val.town)```
./run.sh > /var/www/html/crypto-prices.json
```Then in your Google Sheet, try something like:
```
=ImportJSON("https://yourwebsite.com/crypto-prices.json", "", "rawHeaders,noTruncate,noInherit")
```which unfortunately ouputs things as two rows... you can combine them into a more usable 2-column layout with the `TRANSPOSE()` function
Could we fix this using a different structure for the JSON? it's a mystery
## License
MIT
Pull requests welcome