Migrating to Carbium
Switch from Helius, QuickNode, Triton, or Jupiter to Carbium in minutes. Drop-in RPC replacement, Swap API migration, and gRPC streaming guide with code examples.
Switch from Helius, QuickNode, Triton, Alchemy, or Jupiter to Carbium in under 2 minutes. One key covers RPC + gRPC. No config overhaul required.
- RPC key → rpc.carbium.io/signup
- Swap API key → api.carbium.io/login
Quick switch
If you're already on a standard Solana JSON-RPC provider, this is a URL swap.
Before:
https://mainnet.helius-rpc.com/?api-key=YOUR_KEY
https://solana-mainnet.quiknode.pro/YOUR_KEY/
https://solana-mainnet.g.alchemy.com/v2/YOUR_KEY
https://mainnet.rpcpool.com/YOUR_KEY
After:
https://rpc.carbium.io/?apiKey=YOUR_CARBIUM_RPC_KEY
By SDK
JavaScript / TypeScript
import { Connection } from "@solana/web3.js";
// Before
const connection = new Connection("https://mainnet.helius-rpc.com/?api-key=...");
// After
const connection = new Connection(
`https://rpc.carbium.io/?apiKey=${process.env.CARBIUM_RPC_KEY}`,
"confirmed"
);Python
from solana.rpc.api import Client
import os
# Before
rpc = Client("https://solana-mainnet.quiknode.pro/YOUR_KEY/")
# After
rpc = Client(f"https://rpc.carbium.io/?apiKey={os.environ['CARBIUM_RPC_KEY']}")Alternatively with raw requests:
import requests
RPC = "https://rpc.carbium.io"
headers = {"X-API-KEY": "YOUR_CARBIUM_RPC_KEY"}
payload = {"jsonrpc": "2.0", "id": 1, "method": "getBalance", "params": ["PUBKEY"]}
r = requests.post(RPC, json=payload, headers=headers, timeout=10)Rust
use solana_client::rpc_client::RpcClient;
// Before
let client = RpcClient::new("https://mainnet.helius-rpc.com/?api-key=YOUR_KEY");
// After
let url = format!(
"https://rpc.carbium.io/?apiKey={}",
std::env::var("CARBIUM_RPC_KEY").unwrap()
);
let client = RpcClient::new(url);Environment variables
Never hardcode keys. Use env vars — they can be rotated anytime from the dashboard.
# .env
CARBIUM_RPC_KEY=your_rpc_key_here # covers RPC + gRPC
CARBIUM_API_KEY=your_api_key_here # Swap API (separate key)One key, two endpoints. Your
CARBIUM_RPC_KEYworks for bothrpc.carbium.io(JSON-RPC) andgrpc.carbium.io(gRPC streaming).
Auth methods
Carbium supports two auth methods — use whichever fits your setup:
| Method | Example |
|---|---|
| Query parameter | https://rpc.carbium.io/?apiKey=YOUR_KEY |
| Request header | X-API-KEY: YOUR_KEY |
From Helius
Drop-in URL replacement. Same JSON-RPC 2.0, same SDKs.
// Before
const connection = new Connection("https://mainnet.helius-rpc.com/?api-key=abc123");
// After
const connection = new Connection(
`https://rpc.carbium.io/?apiKey=${process.env.CARBIUM_RPC_KEY}`
);| Feature | Helius | Carbium |
|---|---|---|
| Standard JSON-RPC | ✓ | ✓ drop-in |
| Auth format | ?api-key=KEY | ?apiKey=KEY or X-API-KEY header |
| Webhooks / event streaming | Helius webhooks | gRPC grpc.carbium.io |
| Enhanced transactions API | Helius-specific | Docs: carbium-dex-api |
| DAS (Digital Asset Standard) | ✓ | Use RPC getAsset |
From QuickNode
// Before
const connection = new Connection("https://solana-mainnet.quiknode.pro/YOUR_TOKEN/");
// After
const connection = new Connection(
`https://rpc.carbium.io/?apiKey=${process.env.CARBIUM_RPC_KEY}`
);| Feature | QuickNode | Carbium |
|---|---|---|
| Standard JSON-RPC | ✓ | ✓ drop-in |
| Auth format | Embedded in URL path | ?apiKey=KEY or header |
| Streams (Kafka/webhooks) | QuickNode Streams | gRPC grpc.carbium.io — Yellowstone-compatible |
| Metis (Jupiter swap) | QuickNode add-on | Swap API api.carbium.io — powered by CQ1 |
From Triton / Triton One
Pure URL swap — Triton uses standard Solana JSON-RPC:
// Before
const connection = new Connection("https://YOUR_ENDPOINT.mainnet.rpcpool.com/");
// After
const connection = new Connection(
`https://rpc.carbium.io/?apiKey=${process.env.CARBIUM_RPC_KEY}`
);If you were using Triton's Yellowstone gRPC, your subscription code works unchanged — same protocol:
// Before (Triton gRPC)
// wss://your-endpoint.mainnet.rpcpool.com/
// After (Carbium gRPC — same Yellowstone format)
const ws = new WebSocket(
`wss://grpc.carbium.io/?apiKey=${process.env.CARBIUM_RPC_KEY}`
);
// Your existing transactionSubscribe / accountSubscribe logic works as-isFrom Jupiter (Swap API)
Jupiter uses public endpoints with no auth. Carbium's Swap API requires an API key but adds sub-ms CQ1 routing and native Jito bundling.
const API_KEY = process.env.CARBIUM_API_KEY;
// Quote
const quote = await fetch(
"https://api.carbium.io/api/v2/quote?" +
"src_mint=So11111111111111111111111111111111111111112" +
"&dst_mint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" +
"&amount_in=1000000000" +
"&slippage_bps=50",
{ headers: { "X-API-KEY": API_KEY } }
).then(r => r.json());
// Swap (returns base64 serialized transaction)
const { transaction } = await fetch(
"https://api.carbium.io/api/v2/swap?" +
"fromMint=So11111111111111111111111111111111111111112" +
"&toMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" +
"&amount=1000000000&slippage=50",
{ headers: { "X-API-KEY": API_KEY } }
).then(r => r.json());
// Sign and send via RPC
import { Connection, VersionedTransaction } from "@solana/web3.js";
const connection = new Connection(`https://rpc.carbium.io/?apiKey=${process.env.CARBIUM_RPC_KEY}`);
const tx = VersionedTransaction.deserialize(Buffer.from(transaction, "base64"));
// tx.sign([yourKeypair]);
const sig = await connection.sendRawTransaction(tx.serialize(), { maxRetries: 3 });Parameter mapping: Jupiter → Carbium
Quote endpoint:
Jupiter (/v6/quote) | Carbium (/api/v2/quote) |
|---|---|
inputMint | src_mint |
outputMint | dst_mint |
amount | amount_in |
slippageBps | slippage_bps |
Swap endpoint:
Jupiter (/v6/swap) | Carbium (/api/v2/swap) |
|---|---|
inputMint | fromMint |
outputMint | toMint |
amount | amount |
slippageBps | slippage |
Note: Carbium's Quote uses
src_mint/dst_mintwhile Swap usesfromMint/toMint.
Jito bundling (Carbium exclusive)
Jupiter requires separate Jito integration. Carbium bundles it natively — just swap the endpoint:
// Standard swap
const swap = await fetch("https://api.carbium.io/api/v2/swap?...", { headers: { "X-API-KEY": API_KEY } });
// Jito-bundled swap — same params, different endpoint
const bundled = await fetch("https://api.carbium.io/api/v2/swap/bundle?...", { headers: { "X-API-KEY": API_KEY } });gRPC Streaming
Yellowstone-compatible Full Block stream at ~22ms latency. Atomic complete blocks — no shred reassembly needed. Requires Business tier ($320/mo) or above.
Endpoint: wss://grpc.carbium.io/?apiKey=YOUR_RPC_KEY (same key as RPC)
import WebSocket from "ws";
const ws = new WebSocket(
`wss://grpc.carbium.io/?apiKey=${process.env.CARBIUM_RPC_KEY}`
);
ws.on("open", () => {
ws.send(JSON.stringify({
jsonrpc: "2.0", id: 1,
method: "transactionSubscribe",
params: [
{
vote: false,
failed: false,
accountInclude: ["YOUR_PROGRAM_ID"],
accountExclude: [],
accountRequired: [],
},
{
commitment: "confirmed",
encoding: "base64",
transactionDetails: "full",
showRewards: false,
maxSupportedTransactionVersion: 0,
},
],
}));
});
ws.on("message", (raw) => {
const msg = JSON.parse(raw.toString());
if (msg.method === "transactionNotification") {
const { signature, slot } = msg.params.result;
console.log(`tx ${signature} in slot ${slot}`);
}
});
// Always reconnect with exponential backoff
ws.on("close", (code) => {
console.warn(`Disconnected (${code}), reconnecting...`);
// implement exponential backoff here
});
// Keepalive — required every 30s
setInterval(() => ws.ping(), 30_000);Rust (Yellowstone client):
use yellowstone_grpc_client::GeyserGrpcClient;
let mut client = GeyserGrpcClient::connect(
"https://grpc.carbium.io",
Some("YOUR_RPC_KEY"), // passed as x-token header
None
).await?;Migration checklist
- Sign up at rpc.carbium.io/signup
- Set
CARBIUM_RPC_KEYin your.env - Replace old RPC URL with
https://rpc.carbium.io/?apiKey=YOUR_KEY - Add key to
.gitignore/ secrets manager — never commit keys - Test with
getHealthorgetBalanceto confirm connectivity - If using gRPC: update endpoint to
wss://grpc.carbium.io/?apiKey=YOUR_KEY - If using swaps: sign up at api.carbium.io/login, set
CARBIUM_API_KEY
Endpoint reference
| Product | Endpoint | Auth | Key source |
|---|---|---|---|
| RPC | https://rpc.carbium.io/?apiKey=KEY | Query param | rpc.carbium.io/signup |
| gRPC (WebSocket) | wss://grpc.carbium.io/?apiKey=KEY | Query param | Same RPC key |
| gRPC (HTTP/2, Rust) | https://grpc.carbium.io | x-token: KEY header | Same RPC key |
| Swap API | https://api.carbium.io | X-API-KEY: KEY header | api.carbium.io/login |
Pricing
| Tier | Cost | Credits/mo | Max RPS | gRPC |
|---|---|---|---|---|
| Free | $0/mo | 500K | 10 | — |
| Developer | $32/mo | 10M | 50 | — |
| Business | $320/mo | 100M | 200 | ✓ |
| Professional | $640/mo | 200M | 500 | ✓ |
Quick reference
| Old provider | Carbium | |
|---|---|---|
| RPC endpoint | Provider URL | https://rpc.carbium.io |
| Swap API | Jupiter (no auth) | https://api.carbium.io/api/v2 |
| gRPC streaming | Separate provider | wss://grpc.carbium.io |
| MEV protection | Separate Jito SDK | Built-in via /swap/bundle |
| Infrastructure | AWS / GCP | Bare-metal |
| Free tier | Varies | 500K credits/mo, no credit card |
Need help?
- Docs: docs.carbium.io
- RPC quickstart: docs.carbium.io/docs/quick-start-rpc
- Swap API quickstart: docs.carbium.io/docs/quick-start-dex-api
- gRPC guide: docs.carbium.io/docs/solana-grpc
- API recipes: docs.carbium.io/recipes
- Discord: discord.com/invite/spiderswap
- Telegram: t.me/Tolysspider
Updated 1 day ago
