Global explorer
GlobalExplorer provides cross-network queries that aren't tied to a specific chain — market data, network information, and logo URLs. Use cg.exploreGlobal() to get an instance.
import { ChainGate } from 'chaingate'
const cg = new ChainGate({ apiKey: 'your-api-key' })
const global = cg.exploreGlobal()
Available methods
| Method | Description |
|---|---|
getMarkets() | Market data for all supported cryptocurrencies (prices, market cap, volume, etc.) |
getNetworksInfo() | Real-time information for all networks |
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}`)
}
Network information
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://...'