When to use it
Saying what a transfer was worth: the event carries the token and the amount, and this step carries the price.
At a glance
| Integration | CoinGecko |
|---|---|
| Credits | 1 |
| Connection | CoinGecko, by pasting a key |
Settings
tokenOptionalAccepts event fields- Token. The token's contract address. Empty uses the event's token.
chain- Chain. Leave it on the event's chain unless the step should always look at one chain.
What it hands on
Actions run in order, and each one can read what the actions above it produced. This one writes the fields below; a later action reaches them as {{ actions.coingecko_token_price_1.price_usd }} — the action’s key, then which one it is if you use more than one of the same kind.
price_usd- The price in US dollars.
change_24h_pct- How much the price moved in the last 24 hours, in percent. Negative when it fell.
market_cap_usd- Market capitalisation in US dollars.
volume_24h_usd- Traded volume over the last 24 hours, in US dollars.
updated_at- When CoinGecko last updated the price, as an ISO date.
Good to know
- A token CoinGecko does not track, which is most new and small tokens, fails the step with a sentence. The flow keeps running, and the steps below it do not send a message with an empty price.
- When both the token and the chain are set in the step, a token CoinGecko does not track stops the flow, because every event would fail the same way.
- Each lookup uses your own CoinGecko key and counts against its monthly allowance. When the allowance is used up the step fails with a sentence that says so.
- The same lookup asked again within ten seconds is answered from the first one, so a burst of events does not spend the allowance one call at a time.
- Prices are as CoinGecko last updated them, which can be a minute or more behind.