tRPC Crypto Market Data API
tRPC Endpoints
tRPC Crypto Market Data API
Public CoinGecko-backed crypto discovery data for market quotes, news, trending assets, movers, market themes, platforms, and categories.
POST
tRPC Crypto Market Data API
The
cryptoMarketData.* namespace is available on the public tRPC base
endpoint:
- Base endpoint:
POST /v1/trpc - Namespace:
cryptoMarketData.* - Auth: public
- Upstream: CoinGecko API
- Server cache: asset-data-sync writes CoinGecko records to the shared market-data KV cache every 10 minutes; platform-api reads that cache and does not call CoinGecko directly.
Procedures
-
cryptoMarketData.getNews- Purpose: fetch recent CoinGecko crypto news for the
/cryptosurface - Input:
- optional
limit, 1-20, default8
- optional
- Upstream endpoint:
GET /news - Response includes normalized articles, related CoinGecko coin ids, source metadata, and cache metadata
- Purpose: fetch recent CoinGecko crypto news for the
-
cryptoMarketData.getMarketQuotes- Purpose: fetch cached USD market quotes by CoinGecko coin id for native crypto symbol pages
- Input:
- required
coinIds, 1-100 CoinGecko ids
- required
- Upstream endpoint:
GET /coins/markets - Response includes USD price, 24-hour percentage change, market cap, volume, market-cap rank, icon metadata, and cache metadata
-
cryptoMarketData.getGlobal- Purpose: fetch cached global crypto market summary data for market overview surfaces
- Input: none
- Upstream endpoint:
GET /global - Response includes total crypto market cap, 24-hour market-cap change, total volume, BTC/ETH dominance, upstream update timestamp, and cache metadata
-
cryptoMarketData.getMarketThemes- Purpose: fetch cached crypto market themes for Explore right-rail surfaces
- Input: none
- Upstream endpoints:
GET /coins/categoriesandGET /global/decentralized_finance_defi - Response includes the best and worst CoinGecko category by 24-hour market cap change, plus DeFi market cap, DeFi dominance, DeFi/ETH ratio, trading volume, top DeFi coin name, and cache metadata
-
cryptoMarketData.getTrending- Purpose: fetch CoinGecko search-trending coins and categories
- Input:
- optional
limit, 1-20, default8
- optional
- Upstream endpoint:
GET /search/trending - Response includes normalized coins, 24-hour USD change where available, category trend metadata, and cache metadata
-
cryptoMarketData.getTopMovers- Purpose: fetch CoinGecko top gainers and losers across the top 1000 coins
- Input:
- optional
limit, 1-20, default8
- optional
- Upstream endpoint:
GET /coins/top_gainers_losers - Response includes normalized top gainers and top losers with USD price, 1-hour, 24-hour, and 7-day percentage changes
-
cryptoMarketData.getAssetPlatforms- Purpose: fetch CoinGecko asset platforms and Glider CAIP chain mappings
- Input: none
- Upstream endpoint:
GET /asset_platforms - Response includes platform ids, chain identifiers, native coin ids, icons,
and Glider-normalized
chainNamespace,chainReference,assetNamespace, andcaipChainIdwhen the platform is mapped
-
cryptoMarketData.getCoinCategories- Purpose: fetch CoinGecko coin taxonomy categories for indexed coins
- Input: none
- Upstream endpoint:
GET /coins/categories/list - Response includes category ids and display names
Runtime Notes
- CoinGecko API credentials only live in asset-data-sync. Platform-api and browser clients consume cache records.
- Coin categories come from
/coins/categories/list. The GeckoTerminal/onchain/categoriessurface is a separate onchain DEX taxonomy and is not used for canonical coin taxonomy. - Market themes use
/coins/categoriessorted bymarket_cap_change_24h_descand select the best/worst categories with finite 24-hour market-cap change values. - DeFi theme metrics use
/global/decentralized_finance_defi. - Top movers are cached with
duration=24handtop_coins=1000. - Market quotes are cached for the top 1000 CoinGecko coins by market cap.
- Empty arrays with
configured: trueusually mean the cache binding exists but the asset-data-sync refresh has not written a valid record yet.