Giter Club home page Giter Club logo

Comments (17)

efurban avatar efurban commented on July 26, 2024 1

Got it! Changed the dates and all is good. thank you !

from coingecko.

Eloise1988 avatar Eloise1988 commented on July 26, 2024

Hello,

Unfortunately, you can't call multiple dates using the GECKOHIST formula,
Coingecko only allows one date at a time

image

For example:
image

=GECKOHIST("ethereum","USD","price","01-01-2021" ,false)

from coingecko.

tommybivens14 avatar tommybivens14 commented on July 26, 2024

from coingecko.

tommybivens14 avatar tommybivens14 commented on July 26, 2024

from coingecko.

Eloise1988 avatar Eloise1988 commented on July 26, 2024

If you reference to a date, you need to make sure the date is in string format and not datevalue, otherwise Coingecko will not recognize it.
There is an example in the following template sheet, tab "Portfolio Example", right of the table:

image

https://docs.google.com/spreadsheets/d/1-QNPo7-gq3vLMoxrCWg_DwTA5dfD9b-Lv-tRVTqo1RE/edit?usp=sharing

from coingecko.

Eloise1988 avatar Eloise1988 commented on July 26, 2024

I might create a real history function in the future from my own data on servers so that you can call multiple dates at the same time. We will see if I get time and ressources.

from coingecko.

tommybivens14 avatar tommybivens14 commented on July 26, 2024

from coingecko.

Eloise1988 avatar Eloise1988 commented on July 26, 2024

@tommybivens14

I've changed tge Geckohist function so that one can request arrays of data.
New code here:
https://raw.githubusercontent.com/Eloise1988/COINGECKO/master/CoinGeckoV2.gs

GECKOHIST

Ex:
=GECKOHIST("ethereum","usd","price",datevalue("12-31-2020"),datevalue("08-31-2020"))

depanding on the timezone of your sheet either datevalue('mm-dd-yyyy') or datevalue('dd-mm-yyyy')

from coingecko.

tommybivens14 avatar tommybivens14 commented on July 26, 2024

from coingecko.

tommybivens14 avatar tommybivens14 commented on July 26, 2024

from coingecko.

JKZuk avatar JKZuk commented on July 26, 2024

I'm trying to get historical data based on one day
=GECKOHIST("BTC","usd","price","12-12-2020")

I'm getting this message:
"TypeError: Cannot read property 'toString' of undefined (line 825)."

from coingecko.

Eloise1988 avatar Eloise1988 commented on July 26, 2024

@tommybivens14 Sorry I made a mistake in the formula I gave you in terms of date. Instead of
Ex:
=GECKOHIST("ethereum","usd","price",datevalue("12-31-2020"),datevalue("08-31-2020"))

It should be August 2021 not 2020, otherwise start date is greater than end date:
=GECKOHIST("ethereum","usd","price",datevalue("12-31-2020"),datevalue("08-31-2021"))

Also if you get #ERROR 429, just reload the cell until it gives you the values. 429 means that too many people are requesting data from Coingecko at the same time using Google Sheets. We are all using the same set of IP provided by Google, COINGECKO limits by IP address per second.

from coingecko.

Eloise1988 avatar Eloise1988 commented on July 26, 2024

@JKZuk A couple of days ago I changed the GECKOHIST function so that you can require arrays of data instead of just one like shown on GIF below:
GECKOHIST

If you still wish to request the formula
=GECKOHIST("BTC","usd","price","12-12-2020")

I just rewrote the old formula into a new one:
=GECKOHISTBYDAY("BTC","usd","price","12-12-2020")
Screen Shot 2021-10-21 at 10 58 46

You need to download the new code here:
https://raw.githubusercontent.com/Eloise1988/COINGECKO/master/CoinGeckoV2.gs

from coingecko.

JKZuk avatar JKZuk commented on July 26, 2024

=GECKOHISTBYDAY("BTC","usd","price","12-12-2020")

This works very well. Thank you.

There is another small issue. When I try to add the date from a cell it says "Loading..." and then disappears and no value is visible.

from coingecko.

Eloise1988 avatar Eloise1988 commented on July 26, 2024

@JKZuk You need to make sure that the cell format is in text and not in date otherwise the "12-12-2020" will be taken as timestamp value 1607727600 which will not work. Hope that helps.

from coingecko.

efurban avatar efurban commented on July 26, 2024

Thanks for adding this feature. My test shows it pulls hourly data. see attached. not sure if anything has changed.
Also noticed that the sheet has version 2.2.3 where as the latest here is 2.1.1.

image

from coingecko.

Eloise1988 avatar Eloise1988 commented on July 26, 2024

@efurban
It's embedded like that in their api unfortunately.
Get historical market data include price, market cap, and 24h volume (granularity auto)

Minutely data will be used for duration within 1 day, Hourly data will be used for duration between 1 day and 90 days, Daily data will be used for duration above 90 days.

image
https://www.coingecko.com/en/api/documentation

from coingecko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.