Carbium /api and rpc reference
Quote and execute Solana token swaps, stream accounts over WebSocket/gRPC, and hit the RPC with a live try-it on every endpoint.
Authenticate every request with your key in the X-API-KEY header. The API and
the RPC use separate keys paste each below
to drive the try it panels.
Quote and execute Solana swaps. The /quote endpoint routes across multiple AMM families and returns a signed ready transaction in a single call. Quote, route, and (optionally) fee collection happen in one step. Include user_account to get a built txn ready to sign and submit.
Integrator fee
Pass treasury and fee_bps on /quote. The returned transaction collects the fee atomically inside the swap instruction. One tx, one signature, no client side bundling.
- Fee is computed on the gross output (post-swap, pre delivery) and rounded down.
- Range 0 to 500 bps, enforced both server side and onchain via
MAX_FEE_BPS. - SPL output: fee paid in the destination mint to
ATA(treasury, dst_mint). The API auto-prepends acreate_idempotent_atathe first time a treasury is seen for a mint (user pays ~0.002 SOL rent, one-time). - SOL output: fee paid as wrapped SOL via the same idempotent pattern. The treasury can unwrap by closing the ATA.
- Slippage stays on the gross output, and the fee is deterministic on top.
Verify after landing
- Treasury ATA balance increases by
floor(quoted_out * fee_bps / 10000). - User destination balance increases by
delivered_outminusexpected_fee. - Program log contains
carbium fee: <bps> bps to treasury.
New improved quote endpoint. Returns a detailed quote and transaction package for performing a token swap. The response includes calculated output amounts, slippage, routing plan and a serialized transaction ready to be submitted to the blockchain.
Base URL · https://api.carbium.io/api/v2
Query parameters
| Name | Type | Req | Description |
|---|---|---|---|
| src_mint | string | REQUIRED | Input token address
· default So11111111111111111111111111111111111111112 |
| dst_mint | string | REQUIRED | Output token address
· default AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY |
| amount_in | integer | REQUIRED | Input amount (in smallest units / lamports)
· default 1000000000 |
| slippage_bps | integer | REQUIRED | Slippage tolerance (in basis points, e.g. 50 = 0.5%)
· default 50 |
| user_account | string | OPTIONAL | User wallet address (if included, the response returns a base64 txn) |
| treasury | string | OPTIONAL | Treasury address for fee collection |
| fee_bps | integer | OPTIONAL | Fee in basis points (e.g. 30 = 0.3%) |
Try it
no key You can test without an API key. If you prefer, use your own key.
Request
Response
curl --request GET \
--url 'https://api.carbium.io/api/v2/quote?src_mint=So11111111111111111111111111111111111111112&dst_mint=AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY&amount_in=1000000000&slippage_bps=50' \
--header 'X-API-KEY: <your-api-key>'const res = await fetch("https://api.carbium.io/api/v2/quote?src_mint=So11111111111111111111111111111111111111112&dst_mint=AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY&amount_in=1000000000&slippage_bps=50", {
headers: { "X-API-KEY": "<your-api-key>" },
});
console.log(await res.json());import requests
res = requests.get(
"https://api.carbium.io/api/v2/quote",
params={"src_mint": "So11111111111111111111111111111111111111112", "dst_mint": "AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY", "amount_in": "1000000000", "slippage_bps": "50"},
headers={"X-API-KEY": "<your-api-key>"},
)
print(res.json()) Response shape
{
"success": true,
"data": {
"amount_out": "...",
"slippage_bps": 50,
"route": [ ... ],
"transaction": "<base64-encoded-transaction>"
}
} Returns the USD value of the source and destination amounts for a swap. Internally reuses the v2 /quote and CQ1 rates to derive prices.
Base URL · https://api.carbium.io/api/v2
Query parameters
| Name | Type | Req | Description |
|---|---|---|---|
| src_mint | string | REQUIRED | Source token mint address
· default So11111111111111111111111111111111111111112 |
| dst_mint | string | REQUIRED | Destination token mint address
· default EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
| amount_in | integer | REQUIRED | Input amount (in smallest units / lamports)
· default 1000000000 |
| slippage_bps | integer | REQUIRED | Slippage tolerance (in basis points, e.g. 50 = 0.5%)
· default 50 |
| user_account | string | OPTIONAL | User wallet address |
Try it
no key You can test without an API key. If you prefer, use your own key.
Request
Response
curl --request GET \
--url 'https://api.carbium.io/api/v2/quote-usd?src_mint=So11111111111111111111111111111111111111112&dst_mint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount_in=1000000000&slippage_bps=50' \
--header 'X-API-KEY: <your-api-key>'const res = await fetch("https://api.carbium.io/api/v2/quote-usd?src_mint=So11111111111111111111111111111111111111112&dst_mint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount_in=1000000000&slippage_bps=50", {
headers: { "X-API-KEY": "<your-api-key>" },
});
console.log(await res.json());import requests
res = requests.get(
"https://api.carbium.io/api/v2/quote-usd",
params={"src_mint": "So11111111111111111111111111111111111111112", "dst_mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "amount_in": "1000000000", "slippage_bps": "50"},
headers={"X-API-KEY": "<your-api-key>"},
)
print(res.json()) Response shape
{
"srcAmountUsd": 84.12,
"dstAmountUsd": 83.97
} Low level Solana access. Standard JSON-RPC, real time streams over WebSocket, and gRPC (Yellowstone) for high throughput subscriptions, all behind a separate RPC key (not the API key).
What's here
- RPC: standard Solana JSON-RPC (
getSlot,getBalance,getAccountInfo, …) over an HTTPSPOST. - WSS: subscribe to account and transaction changes in real time (
accountSubscribe,transactionSubscribe). The socket stays open and pushes notifications. - gRPC / HTTPS-gRPC: Yellowstone Geyser streams for the lowest latency and highest throughput.
Notes
- Use your RPC key, not the API key.
- WebSocket and gRPC keep a long lived connection. Reconnect on close and resubscribe.
- gRPC isn't callable from a browser. Use
grpcurlor a native client (Rust / Go).
Subscribe in real time to a Solana account's changes over WebSocket. Connect and send the accountSubscribe message; you'll receive an accountNotification on each change.
Base URL · wss://wss-rpc.carbium.io/?apiKey=
Try it
Request
Response
wscat -c wss://wss-rpc.carbium.io/?apiKey=
# luego envía:
> {"jsonrpc":"2.0","id":1,"method":"accountSubscribe","params":["So11111111111111111111111111111111111111112",{"encoding":"jsonParsed","commitment":"confirmed"}]}const ws = new WebSocket("wss://wss-rpc.carbium.io/?apiKey=");
ws.onopen = () => ws.send(JSON.stringify({"jsonrpc":"2.0","id":1,"method":"accountSubscribe","params":["So11111111111111111111111111111111111111112",{"encoding":"jsonParsed","commitment":"confirmed"}]}));
ws.onmessage = (e) => console.log(e.data); Response shape
{"jsonrpc":"2.0","method":"accountNotification","params":{"subscription":1,"result":{"context":{"slot":12345678},"value":{"lamports":1000000000}}}} gRPC stream (Yellowstone Geyser) of Solana accounts and transactions. Not testable from the browser: copy the grpcurl command and run it in your terminal.
Base URL · grpc.carbium.io/?apiKey=0197123c-801c
gRPC streams over HTTP/2 and a binary protocol, so a browser tab can't open them — but it takes one command from your machine:
-
Install
grpcurl(or use a native client in Rust, Go or Node). -
Copy the grpcurl snippet below and pass your RPC key in the
x-tokenmetadata. -
Point it at the server above and stream with the Yellowstone
Subscribemethod.
# gRPC — no testeable desde el navegador
grpcurl -d '{}' \
grpc.carbium.io/?apiKey=0197123c-801c \
geyser.Geyser/Subscribe Response shape
{"filters":["accounts"],"account":{"pubkey":"...","lamports":"1000000000","owner":"..."}} gRPC over HTTP/2 (same Yellowstone service). Not testable from the browser: use grpcurl with your .proto.
Base URL · https://dev-grpc.carbium.io
gRPC streams over HTTP/2 and a binary protocol, so a browser tab can't open them — but it takes one command from your machine:
-
Install
grpcurl(or use a native client in Rust, Go or Node). -
Copy the grpcurl snippet below and pass your RPC key in the
x-tokenmetadata. -
Point it at the server above and stream with the Yellowstone
Subscribemethod.
# HTTP/2 gRPC — no testeable desde el navegador
grpcurl -d '{}' \
dev-grpc.carbium.io \
geyser.Geyser/Subscribe Response shape
{"filters":["transactions"],"transaction":{"signature":"...","slot":"12345678"}} Solana JSON-RPC via Carbium RPC. The tester sends a live POST with the body below.
Base URL · https://rpc-service.carbium.io/?apiKey=
Try it
Request
Response
curl --request POST \
--url 'https://rpc-service.carbium.io/?apiKey=' \
--header 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"getSlot"}'const res = await fetch("https://rpc-service.carbium.io/?apiKey=", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"jsonrpc":"2.0","id":1,"method":"getSlot"}),
});
console.log(await res.json());import requests
res = requests.post("https://rpc-service.carbium.io/?apiKey=", json={"jsonrpc":"2.0","id":1,"method":"getSlot"})
print(res.json()) Response shape
{"jsonrpc":"2.0","result":12345678,"id":1} The full Carbium documentation | guides for the Swap API, RPC, Data and the wider stack. Browse by topic below open any page for the complete walkthrough.
Overview 11
- FAQ Find current answers about Carbium RPC, Swap API, DEX, Data, SPDR, official links, support, pricing, and safe onboarding paths.
- Migrate from Helius to Carbium Move standard Solana RPC traffic from Helius to Carbium, map auth and streaming endpoints, and identify which Helius-specific APIs need a separate migration plan.
- Migrate from Jupiter to Carbium Move a Jupiter-centered Solana swap integration to Carbium by mapping quote parameters, signing boundaries, execution ownership, and rollback checks.
- Migrate from QuickNode to Carbium Replace standard QuickNode Solana RPC traffic with Carbium, map the auth and endpoint changes, and separate Streams, Yellowstone, and Metis before cutover.
- Migrating to Carbium Choose the right migration path into Carbium, separate standard RPC swaps from provider-specific products, and cut over in a safer order.
- Official Links Verify Carbium official product, documentation, support, social, blog, and community links from one trusted docs page.
- Quick Start API Start with Carbium Swap API: create a key, make one authenticated quote request, then move into Q1, execution, pricing, or production guides.
- Quick Start DEX Start swapping on Carbium DEX in minutes. Open the app, connect a Solana wallet, review the route, and move into gasless or deeper DEX docs only when needed.
- Quick Start RPC Start using Carbium RPC in minutes: create a key, copy your endpoint, run a first Solana JSON-RPC call, and follow the right next page for pricing, testing, or production hardening.
- Support Get Carbium support faster: choose the right help path, include useful debugging context, and use the official Discord, FAQ, status, and docs links.
- Carbium - Unified Blockchain Systems Start from the Carbium ecosystem overview: DEX, Swap API, RPC, Data, and SPDR docs, with the right quick-start path for each Solana workflow.
DEVELOPMENT 25
- Ai Coding Practices Understand how to validate AI generated code, simulate transactions, and maintain safety in production. These principles keep your projects secure,…
- API Key Security Best Practices Protect Carbium RPC and Swap API keys with environment variables, endpoint restrictions, key rotation, and safer server-side patterns.
- Automated Market Making Explained Understand how automated market makers price Solana swaps, why liquidity depth and slippage matter, and where Carbium routing fits in the trade path.
- Blockhash Expiry Recovery Playbook Recover safely from Solana blockhash expiry by deciding when to refresh, rebuild, re-sign, check signature status, and avoid duplicate submissions.
- Carbium Auth Matrix See which Carbium key, endpoint, and auth format belongs to RPC, gRPC, and Swap API before you wire the wrong credential into production.
- Carbium for Trading Bots Build Solana trading bots on Carbium with the right split between RPC, Swap API, CQ1-backed quote flows, gRPC streaming, and production-safe key handling.
- Carbium for Wallet Developers Build wallet flows with Carbium RPC, Swap API, and Token Index data while keeping signing, API keys, token metadata, and transaction relay on the right side of the client/backend boundary.
- Core Concepts Learn about accounts, programs, instructions, and transactions, the foundation of every Solana application.
- Debug Solana Transaction Simulation Use simulateTransaction and preflight logs to debug failed Solana transactions before changing routes, signers, or RPC providers.
- Solana Development Use Carbium's Solana development hub to choose the right foundation page before moving into RPC, Swap API, Data, wallet, bot, or production guides.
- Developing with Carbium Carbium on Solana is both coder and Ai friendly. Learn from our simple snippets or harness natural language workflows to build on Carbium.
- Developing With Carbium Start building on Carbium with practical integration guides for wallets, swaps, RPC-backed flows, and production-safe application patterns.
- Executing Swaps Execute a Carbium swap from executable Q1 quote to wallet approval, RPC submission, confirmation, and production retry handling without exposing API keys or signing material.
- Gasless Token Swap Build a backend-assisted gasless swap flow with Carbium's documented v1 swap surface while keeping API keys server-side and user signing inside the wallet.
- getProgramAccounts Without Melting Your App Use Solana getProgramAccounts safely with filters, data slices, slot context, caching, and clear handoffs to streaming when raw RPC is the wrong tool.
- Jito Bundles for Solana Swap Backends Decide when a Solana swap backend should use a normal send, priority fees, or a Jito-style bundle handoff through Carbium's documented swap execution path.
- Learn to Code with AI Use AI assistants with Carbium docs safely: give them the right product context, ask for verifiable Solana code, and validate every RPC or Swap API step before production.
- Quote to Swap Integration Guide Build a backend-safe Carbium swap flow from quote request to signed submission by separating API auth, signing boundaries, RPC relay, and confirmation checks.
- Get Balance with Carbium Fetch a Solana wallet balance through Carbium RPC with curl or Python, using the current endpoint and a safe server-side key pattern.
- Safe RPC Failover Checklist Add backup Solana RPC paths without creating stale reads, duplicate transaction sends, or noisy health checks that hide the real failure.
- Sample Applications Explore practical sample apps built with Solana, Carbium RPC and APIs. Learn how to fetch data, run swaps, and automate Solana workflows with ready code.
- Sending Transactions through Carbium RPC Relay user-signed swap transactions through Carbium RPC with a safer backend flow, cleaner signing boundaries, and confirmation checks that avoid duplicate sends.
- Build a Solana Arbitrage Quote Engine Build a Solana quote scanner that checks round-trip routes with Carbium Q1 before you decide whether execution is worth wiring in.
- Solana Commitment Levels Choose processed, confirmed, or finalized commitment for Solana balance reads, swap confirmations, trading bots, dashboards, and settlement flows.
- Transaction Lifecycle Follow a Solana transaction from message construction to confirmation, with Carbium handoffs for quotes, signing, RPC submission, blockhash recovery, and post-send debugging.
Carbium API 16
- All Quote Compare documented v1 Swap API quote results across providers, read provider-level route misses correctly, and choose when to move into transaction building.
- Carbium Swap API Start from Carbium Swap API: choose the right quote and execution path, route wallet or bot builds into the right guides, and avoid mixing request families.
- CQ1 Data Layer The data layer ensures the routing engine always operates on fresh, queryable state. It combines binary native storage with real time ingestion to…
- CQ1 Overview The Carbium Quote 1 (CQ1) Engine is a high performance DEX aggregation system designed for sub millisecond quote generation on Solana. It combines…
- CQ1 Routing Engine The routing engine is responsible for finding optimal swap paths across all supported liquidity sources. It combines massively parallel path evaluation…
- Custom Fee Build a standalone custom-fee transaction with Carbium's documented v1 fee endpoint, then sign and submit it through your normal transaction flow.
- API Commands Choose the right Carbium Swap API command, understand the v2 Q1 and v1 request families, and jump to the matching guide or API reference.
- Swap API Pricing, Limits, and Quotas Choose the right Carbium Swap API plan by comparing published request ceilings, public per-swap pricing, and the point where custom terms start.
- Get your API key Create a Carbium Swap API key, verify the right auth header, and make your first authenticated quote request without mixing it up with the RPC key.
- Swap Use the documented v1 Swap endpoint to build a provider-specific base64 transaction, understand required parameters, and avoid mixing it with the newer Q1 quote flow.
- Q1 Use Carbium Q1 to request live Solana swap quotes and, when needed, an executable transaction payload from the current /api/v2/quote flow.
- Quote Use the documented v1 Quote endpoint to request a provider-specific quote, read output and slippage fields, and decide when to move to Q1 or Swap.
- Supported DEXs and Routing Sources Understand the current Solana liquidity sources Carbium can route through, why route availability changes by pair and size, and why new integrations should use the CQ1-backed v2 Swap API flow instead of legacy v1 routes.
- Swap API Errors Reference Troubleshoot Carbium Swap API authentication, request-shape, route-building, and missing transaction payload failures before the flow reaches signing or RPC submission.
- Swap API Request Families Choose the correct Carbium Swap API request family before you debug parameters, route misses, missing transaction payloads, or v1/v2 migration issues.
- Txn Bundle Submit a signed Swap API transaction through Carbium's documented bundle path, understand the signedTransaction handoff, and avoid treating bundle submission as a signing step.
Carbium DEX 8
- New Pairs Use New Pairs to evaluate newly visible Solana trading opportunities in Carbium DEX without skipping quote, mint, route, or wallet checks.
- Bulk-token Manager Bulk token manager enables users to organize, transfer, and interact with multiple tokens in bulk within a single interface.
- Gasless Swaps Use Carbium Gasless Swaps when a Solana user needs to swap without already holding SOL for the network fee.
- In-Depth DEX Understand where Carbium DEX fits: browser swaps, gasless onboarding, API handoff, and the right next page for each Solana trading workflow.
- Carbium Mobile Experience Use Carbium DEX from a mobile browser: connect a Solana wallet, review the quote and wallet prompt, and know when to move into gasless or desktop/API docs.
- Referrals Earn rewards effortlessly by inviting others to join Carbium and grow the Solana ecosystem together.
- Staking SPDR Staking $SPDR offers token holders the opportunity to earn passive income through Carbium platform fees. 15% allocated to stakers..
- Swap on Carbium DEX Use the Carbium DEX swap screen to connect a Solana wallet, review the route, sign in-wallet, and decide when to move into gasless or API docs.
Carbium RPC 17
- RPC Dashboard The Dashboard is your Carbium mission control, giving you a real time overview of your account, usage, and credits.
- Calls Monitoring The Usage page provides real time visibility into your Carbium RPC activity. You always know exactly how your infrastructure performs.
- RPC Pricing and Usage Tiers Choose the right Carbium RPC plan by comparing monthly credits, throughput caps, and when Business-tier gRPC starts to matter.
- Carbium vs Helius vs QuickNode: Solana RPC Comparison Compare Carbium, Helius, and QuickNode by Solana RPC fit, pricing model, streaming path, migration risk, and production workload shape.
- Get Your API Key Before you can make requests to Carbium RPC, you’ll need an API key. Here’s how to generate yours in seconds
- Get Your Endpoint Get your free Solana RPC endpoint from Carbium. Connect instantly, generate an API key, and start building with the most price efficient RPC on Solana.
- GRPC Use Cases Strategic applications for Carbium's Layer 2 Full Block streams. Optimized for indexing, sophisticated trading, and MEV.
- Carbium RPC Understand where Carbium RPC fits in a Solana stack, which endpoint to use, and which deeper setup, pricing, rate-limit, or streaming page to read next.
- RPC Errors Reference Triage Carbium RPC authentication, rate-limit, JSON-RPC, and Solana transaction errors without guessing which layer failed.
- Payment Methods Understand how Carbium RPC payment and credit activation fit into the plan choice, dashboard, API-key, and production rollout workflow.
- Carbium gRPC Connect to Carbium's documented Solana streaming endpoints with the right client path, auth format, and production checks for Yellowstone-style gRPC.
- Example Calls Carbium RPC contains all the standard calls. Once you've created your free account with 500k credits on us, you can begin testing.
- Solana RPC Node Is Behind Diagnose Solana RPC node lag, slot freshness, health checks, and safe response policy when an endpoint reports that it is behind the cluster tip.
- Solana RPC Rate Limits Explained Understand Carbium RPC rate limits, 429 responses, burst traffic, and safe retry patterns for production Solana apps.
- Status and Metrics Use Carbium RPC status, dashboard, and usage signals to separate normal traffic, rate-limit pressure, and incidents.
- What is RPC? Carbium bare metal infrastructure delivers high performance Solana RPC with reliable access, free starting tier and lower cost than competing providers.
- Your First Test Call You can test any Carbium RPC endpoint and method directly from your dashboard. How to Run a Test Call
Carbium Data 7
- Build a Token Selector With Carbium Data Build a production-friendly Solana token selector with Carbium Data: debounced search, batch mint hydration, cached logos, nullable metadata, and rate-limit-safe client behavior.
- Token API Calls Call the public Carbium Token Index API: search tokens, resolve a mint, batch resolve up to 500 mints, and fetch cached token logos.
- Carbium Data Errors and Limits Handle Carbium Data token search misses, unknown mints, invalid batch requests, cached logo fallbacks, route limits, and HTTP 429 responses without breaking a wallet, bot, dashboard, or token selector.
- Carbium Data Carbium Data is the public token data layer for Solana builders: search, mint lookup, batch resolves, metadata enrichment, and cached token logos through a free rate-limited REST API.
- Data Rate Limits Understand Carbium Data public route limits, how to avoid 429 responses, when to batch requests, and how to design a production-friendly cache.
- Data Use Cases Practical ways to use Carbium Data: token search, portfolio hydration, batch mint resolving, logo proxying, agents, dashboards, and Solana app onboarding.
- Quick Start Data Make your first Carbium Data calls: search tokens, resolve one mint, batch resolve multiple mints, and load cached token logos from the public REST API.
SPDR 8
- Ecosystem Fees Stake $SPDR – Carbium Staking Hub
- SPDR SPL-20 SPDR SPL 20 is a commemorative Token22 standard NFT on Solana, created purely as a celebration of art and the Spiderswap ecosystem.
- Distribution Gain insights into $SPDR utility token distribution within the Carbium ecosystem. Learn how tokens are allocated to drive growth, incentivize…
- Tokenomics Discover the economic framework behind Carbium’s $SPDR token , a model designed to sustain a transparent, decentralized, and community driven Solana…
- Staking SPDR Staking $SPDR offers token holders the opportunity to earn passive income through platform rewards.
- The Art Our collection is a meticulously crafted pixel themed masterpiece, thoughtfully designed to reflect the vision, creativity, and ethos of Web Weavers.
- Vision Our founder, Modsiw explains why we built Carbium.
- Web Weavers Solana based NFT collection consists of 2,222 unique pixelated creatures, each a vibrant symbol of what it means to be part of something bigger than a…