While trying to build a price tracking app in google sheets I’m running into an issue. I have added the following function to google sheets App Scripts:
https://github.com/bradjasper/ImportJSON/blob/master/ImportJSON.gs
Now when I try to call this function from any cell I’m getting a parse error.
I am a total novice at this, but I believe I am following the proper syntax mentioned in ImportJSON github page liked above, and in this article issued by to the site I am trying to call data from:
https://www.coingecko.com/learn/crypto-portfolio-tracker-google-sheets
I can access the API url without issue.
API request
For example when I try this:
=IMPORTJSON(“https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=250&page=1&sparkline=true&price_change_percentage=1h%2C24h%2C7d%2C30d&locale=en&precision=3?&x_cg_demo_api_key=MY_KEY”,“/name,/current_price,/market_cap,/price_change,/total_volume,/high_24h,/low_24h”,“noTruncate”,doNotDelete!$A$1)
(note I omitted my private API key above)
error says ImportJSON only takes 3 arguments, hinting at the underlined red section
