Skip to content
CoinGecko Pack
CoinGecko Pack

Getting Started

While this pack’s first appearance is simple, its use of Object Schemas exposes a lot of advanced functionality.
To get started, if you haven’t already done so,
Copy this doc
so we can edit it and see what is happening.
Coin Details
Once we have a new editable document, type = on a new line, say below this paragraph, this will open the formulas prompt, type CoinGecko then press tab, this will show you the several formulas available to you:
CleanShot 2022-08-03 at 09.11.47.jpg
CleanShot 2022-08-03 at 09.11.53.jpg
We will then type or select GetCoinDetails and press tab, then enter:
CleanShot 2022-08-03 at 09.25.57.jpg
And you will get a result like this:
Properties of Coin Details, and Market Data
You can then right click the result, and type a dot . to see its properties:
CleanShot 2022-08-03 at 09.28.05.jpg
Navigate through them with your keyboard to discover everything available to you. Once you have done so, navigate to Market and you will see the current market price for that coin in USD:
CleanShot 2022-08-03 at 09.28.00.jpg
However, if you press . again, you’ll discover there is another level of fine-grained details available to you:
CleanShot 2022-08-03 at 09.30.37.jpg
Navigate through them to discover your options. Navigate to Price, and press tab again, then type . again:
CleanShot 2022-08-03 at 09.31.38.jpg
CleanShot 2022-08-03 at 09.31.46.jpg
CleanShot 2022-08-03 at 09.32.05.jpg
These are all the currencies that have prices available for that coin, select whichever one you want.
Historical Market Data
You can also fetch historical market data. To get the market data for Bitcoin from a month ago, type = then the following CoinGecko::GetCoinMarket("bitcoin", RelativeDate(now(), -1)) and press enter, and you’ll get the following:
Right clicking it will give us all the same properties as the market details from earlier, but this time for that earlier date!
You can connect that to a date input by creating one by entering a new line below this paragraph, and typing the forward slash character / then type date and select Date and time
CleanShot 2022-08-03 at 09.39.01.jpg
CleanShot 2022-08-03 at 09.39.22.jpg
You will get the following control:
8/3/2022, 9:00 AM
Call it whatever you’d like, the one above is called coinWhen :
CleanShot 2022-08-03 at 09.40.44.jpg
Then, let’s make a new GetCoinMarket formula that instead of using last month via RelativeDate(now(), -1) now uses the name of your date control:
CleanShot 2022-08-03 at 09.43.14.jpg
You’ll get something like this!
If we want to search for a coin, we can use the SearchCoins formula, with our search term:
CleanShot 2022-08-03 at 09.45.21.jpg
Which will result in the below list:
MMFinance (Polygon)
Sheesha Finance Polygon
Index Coop - ETH 2x Flexible Leverage Index (Polygon)
Amun Polygon Ecosystem Index
WaultSwap Polygon
WolfSafePoorPeople Polygon
BTC 2x Flexible Leverage Index (Polygon)
Polygon HBD
Rail Polygon
Polygon Hive
Polygon BabyDoge
Aave Polygon DAI
Aave Polygon USDC
Aave Polygon WBTC
Aave Polygon WETH
Aave Polygon AAVE
Aave Polygon USDT
Aave Polygon WMATIC
Pancake Bunny Polygon
Wrapped USDT (Allbridge from Polygon)
We can hover over any of the results and see the properties inside it:
CleanShot 2022-08-03 at 09.45.46.jpg
This is a good way to discover the CoinGecko identifier for a coin, or if we wish to do it programatically we can do: CoinGecko::SearchCoins("Polygon").First().Id like so:
Sync Tables
The pack also provides a few sync tables to get us started, these are pre-populated tables. To access them do the slash command, then select CoinGecko under Pack Tables
CleanShot 2022-08-03 at 09.50.03.jpg
CleanShot 2022-08-03 at 09.49.07.jpg
Manual Tables
However most of the time, we will be working with a table you already have, so let’s do that, image the below is your own table:
My Table
Coin Details
Coin Market
There are no rows in this table
You can see we have three text columns, one for the name, one for the details, and one for the market details.
Convert Coin Details into the rich CoinGecko column type for it:
CleanShot 2022-08-03 at 09.54.21.jpg

And do the same for Coin Market but select CoinMarket instead:

CleanShot 2022-08-03 at 09.55.13.jpg

Then add a formula for Coin Details to fetch the details for the coin that matches that search by using CoinGecko::SearchCoins(thisRow.[Coin Name]).First().Id as the formula:
CleanShot 2022-08-03 at 09.56.18.jpg
CleanShot 2022-08-03 at 09.56.52.jpg

Now add a formula for Coin Market so we can access the rich market data of the coin details. This time however, instead of using a search, we can use the Id value from our Coin Details:
CleanShot 2022-08-03 at 09.59.19.jpg

CleanShot 2022-08-03 at 09.59.28.jpg
This will result in a table that looks like this:
CleanShot 2022-08-03 at 10.00.52.jpg
And allows us to add new columns with those rich properties:
CleanShot 2022-08-03 at 10.01.56.jpg
CleanShot 2022-08-03 at 10.01.22.jpg
Note that the Coin Market contains multiple currency data within its price, volume, and market_cap objects, so feel free to experiment with them in similar ways, however for them you will need to use a formula to access them:
CleanShot 2022-08-03 at 10.05.46.jpg
Let’s add a new column for last month’s market details. Add a new Coin Market column, and name it Coin Market Last Month , setting its formula to CoinGecko::GetCoinMarket(thisRow.[Coin Details].Id, RelativeDate(Now(), -1)).Id
CleanShot 2022-08-04 at 04.31.54.jpg
In the end, you’ll end up with something like this:
My Table (Finished)
Coin Name
Coin Details
Coingecko Rank
Market Cap in CHF
Coin Market
Coin Market Last Month
There are no rows in this table
One of the powerful parts of Coda is its automations. You could use an automation rule to check every hour if the bitcoin price has crossed a certain threshold, or if the global market cap has crossed a certain threshold, and send a Coda alert, or a using another Pack to send an email or instant messenger alert.
Let’s create an automation now for the global market cap, to send a notification if it has cross 1.2 trillion. Here are the various controls and fields for it:
Our threshold:
Current market cap:
which is
the threshold
Prior market cap:
which is
the threshold
Our button to check, notify, and update the results
Check Market Cap
Which can be setup via the following :
CleanShot 2022-08-04 at 04.01.43.jpg
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
) instead.