Skip to main content

Global explorer

GlobalExplorer provides cross-network queries that aren't tied to a specific chain — market data, network information, and logo URLs. Use it to build dashboards that show live prices, compare chains by gas fees, or render any UI that needs cross-chain metadata. Use cg.exploreGlobal() to get an instance.

import { ChainGate } from 'chaingate'

const cg = new ChainGate()
const global = cg.exploreGlobal()

Available methods

MethodDescription
getMarkets()Market data for all supported cryptocurrencies (prices, market cap, volume, etc.)
getNetworksInfo()Real-time information for all networks — perfect for "cheapest network" comparisons
getNetworkLogoUrl(networkId)Logo URL for any network (including non-supported ones)

Market data

const global = cg.exploreGlobal()

const markets = await global.getMarkets()
for (const coin of markets) {
console.log(`${coin.symbol}: $${coin.currentPrice.usd}`)
}

coin.currentPrice carries every major fiat pair, so a single fetch is enough to render a ticker or a portfolio view.

Network information

Use getNetworksInfo() to surface live block times, fees, and throughput for every tracked chain — useful for comparing chains side by side (e.g. picking the cheapest network for a transfer) without wiring up a separate integration per chain.

const networksInfo = await global.getNetworksInfo()
for (const info of networksInfo) {
console.log(`${info.name} — block height: ${info.blockHeight}`)
}

Network logos

Get logo URLs for any network — even ones not natively supported by ChainGate:

const btcLogo = global.getNetworkLogoUrl('bitcoin')
const beraLogo = global.getNetworkLogoUrl('berachain')

// Use in an <img> tag or download
console.log(btcLogo) // 'https://...'