Tailflow
Skip to article
Browse documentation

CoinGecko · Action

Pool data

Reads a decentralised exchange pool's name, the price of its base token, the liquidity it holds and what it traded over the last 24 hours.

When to use it

Judging a large swap against the pool it hit: a swap that is a tenth of the pool's liquidity reads differently from one that is a rounding error.

At a glance

IntegrationCoinGecko
Credits1
ConnectionCoinGecko, by pasting a key

Settings

poolOptionalAccepts event fields
Pool. The pool's address. Empty uses the event's pool.
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_pool_1.name }} — the action’s key, then which one it is if you use more than one of the same kind.

name
The pool's name, such as WETH / USDC 0.05%.
address
The pool's address.
price_usd
The price of the pool's base token in US dollars.
liquidity_usd
What the pool holds, in US dollars.
volume_24h_usd
What the pool traded over the last 24 hours, in US dollars.
change_24h_pct
How much the base token's price moved in the last 24 hours, in percent.
created_at
When the pool was created, as an ISO date.

Good to know

  • For a Uniswap v4 swap, use {{ event.pool_id }} as the pool.
  • A pool CoinGecko does not track fails the step. The flow keeps running, unless both the pool and the chain are set in the step.
  • 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.