When to use it
You know a coin by its ticker and not by its CoinGecko id. Put this step before Coin price and give Coin price the id it found.
At a glance
| Integration | CoinGecko |
|---|---|
| Credits | 1 |
| Connection | CoinGecko, by pasting a key |
Settings
queryRequiredAccepts event fields- Symbol or name. A ticker such as ETH, WETH or UNI, or a coin's name such as Uniswap. For the token of an event, use Token price: a token can call itself anything.
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_find_coin_1.id }} — the action’s key, then which one it is if you use more than one of the same kind.
id- The coin's CoinGecko id, such as ethereum or usd-coin. Give this to Coin price.
name- The coin's name.
symbol- The coin's symbol, in capitals.
market_cap_rank- The coin's rank by market cap, or nothing when CoinGecko does not rank it.
matched_by- Whether the coin was found by its symbol or by its name.
same_symbol- How many coins in CoinGecko's search results use this symbol. Above 1, the highest ranked was chosen. CoinGecko's search may not list every coin, so 1 does not prove the symbol is unique.
Good to know
- The symbol or name has to match exactly, in any mix of capitals. A near match is not taken, because a guessed coin would put a wrong price in your message.
- Many coins can share a symbol. The one CoinGecko ranks highest by market cap is chosen, which for a well-known symbol is the coin you mean.
- Do not use this to price the token of an event from its symbol. A token's symbol is whatever its contract says, and anyone can deploy a token called USDC: this step would find the real USDC and the message would value a worthless token at its price. Token price goes by the token's contract address and cannot be fooled this way.
- A symbol CoinGecko does not know fails the step. When it was typed into the form the flow stops, 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.