Chiliz RPC with Dwellir
Chiliz RPC endpoints for Mainnet and Testnet; EVM JSON-RPC quickstarts for curl, ethers.js, viem, and web3.py
Chiliz RPC
With Dwellir, you get access to our global Chiliz network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.
Get your API keyWhy Build on Chiliz?
Chiliz is the leading blockchain for sports and entertainment, designed to power the $50 billion sports fan engagement market. Built as an Ethereum-compatible network, Chiliz offers:
Sports-First Ecosystem
- Fan Tokens native support - Industry-leading fan engagement infrastructure
- 2M+ active sports fans - Direct access to the world's largest web3 sports community
- 100+ sports partnerships - Major clubs and organizations already integrated
High Performance EVM
- Fast finality - Optimized consensus for real-time fan interactions
- Low transaction costs - Affordable microtransactions for fan engagement
- EVM compatibility - Full Ethereum tooling and contract support
Proven Infrastructure
- Battle-tested platform - Powering millions of fan interactions since 2019
- Enterprise-grade security - Institutional infrastructure for major sports brands
- Scalable architecture - Built to handle massive fan engagement events
Quick Start with Chiliz
Connect to Chiliz in seconds with Dwellir's optimized endpoints:
curl -sS -X POST https://api-chiliz-mainnet-archive.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots> \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'import { JsonRpcProvider } from 'ethers';const provider = new JsonRpcProvider( 'https://api-chiliz-mainnet-archive.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>');const latest = await provider.getBlockNumber();console.log('block', latest);import requestsurl = 'https://api-chiliz-mainnet-archive.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>'payload = { 'jsonrpc': '2.0', 'id': 1, 'method': 'eth_blockNumber', 'params': []}resp = requests.post(url, json=payload)print(resp.json())package mainimport ( "bytes" "fmt" "io" "net/http")func main() { url := "https://api-chiliz-mainnet-archive.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>" payload := []byte(`{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}`) resp, err := http.Post(url, "application/json", bytes.NewBuffer(payload)) if err != nil { panic(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body))}Installation & Setup
Network Information
| Parameter | Value | Details |
|---|---|---|
| Chain ID | 88888 | Mainnet |
| Testnet Chain ID | 88882 | Spicy Testnet |
| Gas Token | CHZ | Native token |
| RPC Standard | Ethereum | JSON-RPC 2.0 |
API Reference
Chiliz supports the full Ethereum JSON-RPC API specification. Access all standard methods for seamless EVM integration.
Common Integration Patterns
Transaction Monitoring
Monitor pending and confirmed transactions efficiently:
// Watch for transaction confirmation
async function waitForTransaction(txHash) {
const receipt = await provider.waitForTransaction(txHash, 1);
// Log transaction success
console.log('Transaction confirmed:', receipt.transactionHash);
console.log('Gas used:', receipt.gasUsed.toString());
return receipt;
}Gas Optimization
Optimize gas costs on Chiliz:
// Estimate gas for optimal transaction pricing
const gasEstimate = await provider.estimateGas(tx);
// Get current gas price
const gasPrice = await provider.getGasPrice();
// Calculate total transaction cost
const totalCost = gasEstimate * gasPrice;
console.log('Estimated cost:', totalCost.toString(), 'CHZ');Event Filtering
Efficiently query contract events:
// Query events with pagination for large datasets
async function getEvents(contract, eventName, fromBlock = 0) {
const filter = contract.filters[eventName]();
const events = [];
const batchSize = 5000; // Chiliz recommended batch size
for (let i = fromBlock; i <= currentBlock; i += batchSize) {
const batch = await contract.queryFilter(
filter,
i,
Math.min(i + batchSize - 1, currentBlock)
);
events.push(...batch);
}
return events;
}Performance Best Practices
1. Batch Requests
Combine multiple RPC calls for optimal performance:
const batch = [
{ method: 'eth_blockNumber', params: [] },
{ method: 'eth_gasPrice', params: [] },
{ method: 'eth_getBalance', params: [address, 'latest'] }
];
const results = await provider.send(batch);2. Connection Pooling
Reuse provider instances to minimize connection overhead:
// Singleton pattern for provider
class ChilizProvider {
static instance = null;
static getInstance() {
if (!this.instance) {
this.instance = new JsonRpcProvider(
'https://api-chiliz-mainnet-archive.n.dwellir.com/YOUR_API_KEY'
);
}
return this.instance;
}
}3. Smart Caching
Cache immutable data to reduce API calls:
const cache = new Map();
async function getCachedBlockData(blockNumber) {
const key = `block_${blockNumber}`;
if (!cache.has(key)) {
const block = await provider.getBlock(blockNumber);
cache.set(key, block);
}
return cache.get(key);
}Troubleshooting Common Issues
Error: "Wrong Chain ID"
Ensure you're using the correct chain ID for Chiliz:
// Verify chain connection
const network = await provider.getNetwork();
console.log('Connected to chain ID:', network.chainId);
// Mainnet should return 88888 (0x15b38 in hex)
// Testnet should return 88882 (0x15b32 in hex)Error: "Insufficient funds for gas"
CHZ is required for all transactions on Chiliz:
// Check CHZ balance before transaction
const balance = await provider.getBalance(address);
const gasPrice = await provider.getGasPrice();
const gasEstimate = await provider.estimateGas(tx);
const requiredGas = gasPrice * gasEstimate;
if (balance < requiredGas + tx.value) {
throw new Error(`Need ${(requiredGas + tx.value - balance).toString()} more CHZ`);
}Error: "Rate limit exceeded"
Implement exponential backoff for resilient applications:
async function callWithRetry(fn, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn();
} catch (error) {
if (error.code === 429 && i < maxRetries - 1) {
await new Promise(r => setTimeout(r, 2 ** i * 1000));
} else {
throw error;
}
}
}
}FAQs
What makes Chiliz different from other EVM chains?
Chiliz is purpose-built for sports and entertainment, offering native Fan Token infrastructure and direct access to millions of sports fans worldwide.
Can I use existing Ethereum tools with Chiliz?
Yes! Chiliz is fully EVM-compatible, so all Ethereum tools, libraries, and smart contracts work seamlessly.
What's the native token on Chiliz?
CHZ is the native gas token used for all transactions on Chiliz Chain.
How do I get CHZ for testing?
Use the Spicy Testnet with testnet CHZ from official faucets, or contact Dwellir support for testing assistance.
Smoke Tests
Test Mainnet Connection
# Test mainnet connectivity
curl -X POST https://api-chiliz-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'Test Testnet Connection
# Test Spicy testnet connectivity
curl -X POST https://api-chiliz-spicy.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'Ethers.js Chain Verification
import { JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider(
'https://api-chiliz-mainnet-archive.n.dwellir.com/YOUR_API_KEY'
);
// Verify connection and chain ID
const network = await provider.getNetwork();
console.log('Chain ID:', network.chainId); // Should be 88888
console.log('Block number:', await provider.getBlockNumber());web3.py Connection Test
from web3 import Web3
w3 = Web3(Web3.HTTPProvider('https://api-chiliz-mainnet-archive.n.dwellir.com/YOUR_API_KEY'))
# Verify connection
assert w3.is_connected(), "Failed to connect to Chiliz"
print(f"Chain ID: {w3.eth.chain_id}") # Should be 88888
print(f"Latest block: {w3.eth.block_number}")Migration Guide
From Ethereum Mainnet
Moving from Ethereum to Chiliz requires minimal changes:
// Before (Ethereum)
const provider = new JsonRpcProvider('https://eth-rpc.example.com');
// After (Chiliz)
const provider = new JsonRpcProvider(
'https://api-chiliz-mainnet-archive.n.dwellir.com/YOUR_API_KEY'
);
// Smart contracts work identically
// Same tooling and libraries
// Standard EVM opcodes
// Note: Different chain ID (88888)
// Note: CHZ as gas token instead of ETH
// Note: Sports-focused ecosystemResources & Tools
Official Resources
Sports Ecosystem
- Socios.com - Fan Token platform
- Fan Token Directory - Available fan tokens
- Chiliz Ecosystem - Web3 projects on Chiliz Chain
Need Help?
- Email: support@dwellir.com
- Docs: You're here!
- Dashboard: dashboard.dwellir.com
Start building on Chiliz with Dwellir's enterprise-grade RPC infrastructure. Get your API key

