Get On-Chain Token Prices
Get real-time on-chain token prices by contract addresses using DEX data (Uniswap, PancakeSwap, etc.). Returns USD price with optional market cap, 24h volume, price change percentage, and total liquidity. Works for any token with on-chain liquidity. Ideal for: DeFi price feeds, pricing unlisted tokens, real-time portfolio valuation, trading bot triggers.
Catalog action Blockchain Data
Get real-time on-chain token prices by contract addresses using DEX data (Uniswap, PancakeSwap, etc.). Returns USD price with optional market cap, 24h volume, price change percentage, and total liquidity. Works for any token with on-chain liquidity. Ideal for: DeFi price feeds, pricing unlisted tokens, real-time portfolio valuation, trading bot triggers.
At a Glance
| Field | Value |
|---|---|
| Action ID | coingecko-get-onchain-simple-price |
| Category | Blockchain Data |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | coingecko, onchain, price, token, dex, read |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
network | string | Yes | Network ID (e.g., 'eth', 'bsc', 'polygon_pos', 'arbitrum', 'optimism'). Use /networks endpoint for full list. |
addresses | array | Yes | Array of token contract addresses. |
includeMarketCap | boolean | No | Include market cap in response (default: false). |
mcapFdvFallback | boolean | No | Use FDV if market cap not available (default: false). |
include24hVol | boolean | No | Include 24h volume in response (default: false). |
include24hPriceChange | boolean | No | Include 24h price change percentage (default: false). |
includeTotalReserveInUsd | boolean | No | Include total reserve in USD (default: false). |
includeInactiveSource | boolean | No | Include price data from inactive pools (default: false). |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
network | string | Yes | Network ID (e.g., 'eth', 'bsc', 'polygon_pos'). |
tokens | array | Yes | Array of token price data from DEX sources. |
Examples
json{ "type": "coingecko-get-onchain-simple-price", "payload": { "network": "example-network", "addresses": [] }, "children": []}
bashcurl -X POST "https://api.b3os.org/v1/actions/coingecko-get-onchain-simple-price/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "network": "example-network", "addresses": [] }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
