Get Token Price By Contract
Get token prices by contract address on a specific blockchain (Ethereum, Polygon, Base, Arbitrum, etc.). Returns real-time prices in multiple currencies (USD, EUR, BTC, ETH). Optionally includes market cap, 24h volume, and price change. Use when you have contract addresses instead of CoinGecko IDs. Supports 250+ networks and 100 tokens per request. Ideal for: DeFi applications, multi-chain portfolio tracking, price verification, smart contract integrations.
Catalog action Blockchain Data
Get token prices by contract address on a specific blockchain (Ethereum, Polygon, Base, Arbitrum, etc.). Returns real-time prices in multiple currencies (USD, EUR, BTC, ETH). Optionally includes market cap, 24h volume, and price change. Use when you have contract addresses instead of CoinGecko IDs. Supports 250+ networks and 100 tokens per request. Ideal for: DeFi applications, multi-chain portfolio tracking, price verification, smart contract integrations.
At a Glance
| Field | Value |
|---|---|
| Action ID | coingecko-get-token-price-by-contract |
| Category | Blockchain Data |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | coingecko, price, token, contract, erc20, defi, multi-chain, read |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
platform | string | Yes | Asset platform ID (blockchain network). Common values: 'ethereum', 'polygon-pos', 'arbitrum-one', 'optimistic-ethereum', 'base', 'binance-smart-chain', 'avalanche'. Use get-asset-platforms action for full list. |
contractAddresses | array | Yes | Array of token contract addresses on the specified platform. Must be valid addresses for the platform (e.g., 0x... for EVM chains). |
vsCurrencies | array | Yes | Array of target currencies to get prices in (e.g., ['usd', 'eur', 'btc']). Common options: usd, eur, gbp, jpy, btc, eth. |
includeMarketCap | boolean | No | Include market cap data for each token. Default: false |
include24hVol | boolean | No | Include 24-hour trading volume. Default: false |
include24hChange | boolean | No | Include 24-hour price change percentage. Default: false |
includeLastUpdatedAt | boolean | No | Include last updated timestamp for each token. Default: false |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
tokens | array | Yes | Array of token prices. Each item contains: contractAddress, platform, prices (price in each currency), and optionally marketCaps, volumes24h, priceChange24h, lastUpdatedAt. |
Examples
json{ "type": "coingecko-get-token-price-by-contract", "payload": { "platform": "example-platform", "contractAddresses": "0x0000000000000000000000000000000000000000", "vsCurrencies": [] }, "children": []}
bashcurl -X POST "https://api.b3os.org/v1/actions/coingecko-get-token-price-by-contract/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "platform": "example-platform", "contractAddresses": "0x0000000000000000000000000000000000000000", "vsCurrencies": [] }}'
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.
