LI.FI is the universal liquidity layer that connects any application to all onchain liquidity across chains, bridges, DEXs, solvers, and yield protocols through a single integration. Its API and SDK abstract the complexity of bridging, swapping, and executing transactions across 40+ blockchain networks, enabling developers to move any asset seamlessly. Today, more than 1,000 B2B integrators rely on LI.FI's infrastructure, including consumer wallets such as MetaMask, Phantom, Ledger Live, and Rabby, fintech platforms such as Robinhood, Kraken, and Circle, and institutional trading desks operating at enterprise scale.
By integrating CoinGecko's API, LI.FI powers its token service architecture with accurate, real-time price data across more than 2 million tokens, delivering the pricing freshness its integrators and their end users demand.
Key Metrics at a Glance
-
By integrating CoinGecko’s API, LI.FI's token service delivers real-time, accurate pricing across 2M+ tokens spanning 40+ blockchain networks, giving its 1,000+ B2B integrators a single, reliable pricing source for every asset they support.
-
LI.FI leverages CoinGecko's WebSocket API to deliver price updates every second for thousands of the most traded tokens, eliminating the need for aggressive REST polling on assets where real-time freshness matters most.
-
LI.FI's 8-tier bucketing system, which uses Coingecko's REST and WebSocket capabilities as the main token price oracles, processes approximately 1 billion token price updates per month while using 80% fewer API calls than a uniform polling approach, keeping API costs efficient at enterprise scale without compromising on price freshness.
The Challenge: Pricing 2M+ Tokens Accurately at Scale
LI.FI operates one of the most complex token pricing environments in DeFi. Its bridge and DEX aggregation protocol spans 40+ blockchains and serves more than 1,000 B2B integrators, each with different latency tolerances, liquidity profiles, and user-facing SLA requirements.
The core engineering challenge was designing a pricing system capable of serving those 2 million tokens simultaneously, where each token carried a different freshness requirement depending on its trading activity, volatility, and how frequently end users interacted with it. A single uniform polling cadence was not viable at that scale. Applying the same update frequency to every token would either exhaust API rate limits on high-activity assets or leave low-liquidity tokens underserved during periods of market stress. LI.FI needed an architecture that could dynamically match data freshness to token behavior, maintain rate efficiency across the full token universe, and hold up under production load without manual tuning.
Why LI.FI Chose CoinGecko API
LI.FI built its token service to be provider-agnostic with a standardized oracle adapter layer that can run multiple price sources in parallel. After evaluating more than a dozen oracles on network coverage and data freshness, the team chose CoinGecko as its primary reference provider for four core reasons:
-
Broadest token coverage: CoinGecko tracks the long tail of tokens across 40+ chains, which is critical for a protocol that must price any asset a user wants to swap.
-
WebSocket streaming: CoinGecko’s real-time price delivery via WebSocket allows LI.FI to update volatile token prices every second, eliminating the need for aggressive REST polling on high-activity assets.
-
Consolidation without lock-in: CoinGecko's breadth of coverage allowed LI.FI to consolidate its primary oracle to a single provider, reducing operational overhead.
-
Onchain token discovery: CoinGecko's onchain data endpoints help LI.FI discover new tokens as they begin trading, feeding directly into its automated token discovery pipeline.
What LI.FI Says About CoinGecko API
"We evaluated over a dozen token price oracles before choosing CoinGecko as our reference provider. Our token service architecture is designed to be provider-agnostic — we can integrate any oracle — but no other API matched CoinGecko's combination of coverage across 250+ chains, real-time WebSocket delivery, and the depth of onchain data we need for automated token discovery. CoinGecko's API is what allows us to deliver enterprise-grade price freshness to clients like Robinhood, Ledger, and MetaMask."
— Clément Bihorel, Product Lead at LI.FI
How LI.FI Leverages CoinGecko API
CoinGecko is the primary data source powering LI.FI's token service, which handles all token pricing, discovery, and classification for the entire protocol. Every cross-chain quote, swap, and bridge transaction depends on accurate, fresh token prices, making the data central to the product. The integration spans both REST and WebSocket layers, with CoinGecko connected through a standardized oracle adapter that supports parallel operation with additional providers, automatic fallback chains, and circuit breaker logic for resilience under production conditions.
Batch Price Data via REST API
For the majority of its token universe, LI.FI queries CoinGecko's REST API in batches of up to 50 tokens per call. The /onchain/networks/{network}/tokens/multi/{ids} endpoint handles the heaviest share of this volume, retrieving price and market data for multiple onchain tokens in a single query across supported networks. Alongside it, the /simple/token_price/{id} endpoint handles batch price lookups for tokens identified by contract address on a specific blockchain, complementing the onchain endpoint across different query patterns.
In aggregate, LI.FI processes approximately one billion individual token price updates per month through these two endpoints, equating to roughly 22 million API calls at 50 tokens per batch.
Real-Time Price Streaming via WebSocket
CoinGecko's WebSocket API delivers real-time price updates every second for thousands of the most traded tokens. Rather than polling for price changes at a fixed interval, the WebSocket connection pushes updates as they happen.
The widget below illustrates this in practice. When a user compares swap routes across liquidity providers like Hyphen, Across, and Circle CCTP, LI.FI's routing engine evaluates those options against WebSocket-streamed price data from CoinGecko, returning the most accurate and up-to-date quote for each path in real time.

LI.FI swap widget showing live route comparison with real-time price quotes (USDC to ETH, Polygon, three live route options with pricing).
Additional REST endpoints support supplementary data needs across the token service. The /coins/markets endpoint provides market cap and volume context for tokens. The /coins/{id}/market_chart/range endpoint supports historical price lookups where needed.
Onchain Token Discovery
LI.FI’s token database covers over two million assets across 40+ networks, a scale that makes manual token curation impossible. To keep the database current as new tokens launch, LI.FI runs an automated discovery pipeline built on CoinGecko’s onchain endpoints.
When LI.FI’s system detects activity around an unrecognized contract address, it queries CoinGecko’s /onchain/networks/{network}/tokens/multi/{ids} endpoint to retrieve verified token metadata, pricing context, and network classification. Tokens that qualify are automatically added to the token service, assigned a pricing tier, and begin receiving price updates.
Data Infrastructure Optimization
Across both data streams, LI.FI's token service applies an 8-tier bucketing system that classifies every token by its trading activity and volatility. High-activity tokens refresh every second, with WebSocket streaming used where possible. Dormant tokens refresh at a lower cadence matched to their actual demand. This tiered architecture is what allows LI.FI to process approximately one billion monthly price updates with 80%+ fewer API calls than a uniform polling approach would require, while maintaining enterprise-grade price freshness on the assets that users trade most.
Business and User Outcomes
Building a token service that prices 2M+ assets at enterprise scale is a tough infrastructure challenge. CoinGecko's API gave LI.FI the data foundation to overcome it, delivering measurable results across price freshness, API efficiency, and automated token discovery.
Real-Time Price Freshness at Scale
By building its token service around CoinGecko's API, LI.FI delivers price updates every second on its most-traded assets while maintaining full pricing coverage across 2M+ tokens. For integrators like Robinhood, Ledger, and MetaMask, this translates directly into more accurate swap quotes, tighter slippage, and a better end-user experience at enterprise scale.
API Efficiency Through Intelligent Tiering
The 8-tier bucketing system, designed specifically around CoinGecko's REST and WebSocket capabilities, achieved an 80%+ reduction in API call volume compared to a uniform polling approach. For LI.FI, the result is a leaner API cost structure at enterprise scale. The protocol prices over two million tokens monthly without the infrastructure spend that uniform polling demands.
Automated Token Discovery at Scale
LI.FI’s token database expands automatically as new assets launch across 40+ networks. For enterprise integrators like Robinhood and Ledger, this means that new token coverage arrives without any action required on their end. Furthermore, CoinGecko's coverage of over 250+ networks with normalized data allows LI.FI to easily extend its token service to new chains without rebuilding its data layer.
What’s Next On The Roadmap
With its token pricing infrastructure in place, the LI.FI team is extending its use of CoinGecko’s real-time data into the universal liquidity execution stack through Smart Slippage v2. This new service calculates dynamic, per-token slippage recommendations by combining real-time price data from CoinGecko with LI.FI’s own DEX aggregation layer and volatility signals. Smart Slippage v2 provides high-precision, per-token slippage that replaces the static defaults common across the industry. Built to meet requirements from enterprise clients like Robinhood, the feature is scheduled to launch in Q2 2026.
Get In Touch
Ready to supercharge your crypto project? Fill in the form below to connect with our API Sales team for a custom CoinGecko API plan tailored to enterprise needs.
This article was written in collaboration with LI.FI team.

Arbitrum
Avalanche
Fantom
Flare
Gnosis
Linea
Optimism
Polygon
Polygon zkEVM
Scroll
Stellar
Story
Syscoin
Telos
X Layer
Xai