Solana RPC for automated apps
Read the chain, listen on Carbon Stream, quote a route, send. One stack for the whole loop, on hardware Carbium owns in Switzerland.
Free to start. Carbon Stream from $20 a month.
Four jobs, one stack
An app that runs on its own does the same four jobs. Carbium has a surface for each, on one key and one host: services.carbium.sh.
services.carbium.shRead the chain
Slots, balances, recent blockhashes and signature status over standard Solana JSON-RPC, with any SDK.
RPC quick startservices.carbium.sh:9443Listen for events
Carbon Stream, native Yellowstone gRPC, pushes the transactions you filter for, so the app reacts instead of polling.
Carbon Stream: Solana gRPC streamingquote, then swapQuote the route
The Carbium Swap API routes across Solana liquidity: quote finds the route, and swap, with your user_pubkey, returns an unsigned transaction.
Quote referencesendRawTransactionSend and confirm
Sign inside your own service, send through RPC, and confirm before the app decides a swap failed.
Sign and send a swap
Streams, not polling
A polling app sees an event at its next poll. A stream delivers it as it happens, and one listener can feed every worker you run.
Move to the stream when
- You watch many programs or accounts continuously
- Your app reacts to transaction-level events and polling arrives too late
- Repeated RPC reads are creating rate-limit pressure
- One listener should feed several workers
Carbon Stream starts on Dev ($20 a month): native Yellowstone gRPC at https://services.carbium.sh:9443 with your key in x-token, 5 concurrent streams, 25 on Business and 100 on Pro. Standard WebSocket works on every plan for lighter subscriptions.
Carbon Stream: Solana gRPC on Carbium// Listen: Carbon Stream, native Yellowstone gRPC on Carbium (Dev, Business and Pro)
import Client, { CommitmentLevel } from "@triton-one/yellowstone-grpc";
const client = new Client("https://services.carbium.sh:9443",
process.env.CARBIUM_KEY, // sent as x-token
{ grpcMaxDecodingMessageSize: 64 * 1024 * 1024 });
await client.connect();
const EMPTY = { accounts: {}, slots: {}, transactions: {}, transactionsStatus: {},
blocks: {}, blocksMeta: {}, entry: {}, accountsDataSlice: [], blockFooter: {} };
const stream = await client.subscribe({
...EMPTY,
transactions: {
mine: { vote: false, failed: false, accountInclude: ["YOUR_PROGRAM_ID"],
accountExclude: [], accountRequired: [] },
},
commitment: CommitmentLevel.CONFIRMED,
});
stream.on("data", (update) => handle(update));
setInterval(() => stream.write({ ...EMPTY, ping: { id: 1 } }), 10_000);
From quote to confirmed swap
The Carbium Swap API returns a route and an unsigned transaction. Your service signs it, Carbium RPC sends it.
Ask for the transaction
Call quote with src_mint, dst_mint, amount_in and slippage_bps; it answers the route and a quoteId. Within 30 seconds, call swap with quote_id and user_pubkey: it answers an unsigned base64 transaction in transaction.
Sign it in your service
Deserialize the transaction and sign with your own key, inside a backend you control. The key is never sent to Carbium.
Send through Carbium RPC
Submit on the standard Solana path. A returned signature only means the node accepted it.
Confirm, then decide
Check the confirmation and its error field before retrying, so a landed swap is never sent twice.
// Quote, build for your wallet, sign, send, confirm
const KEY = process.env.CARBIUM_KEY;
const call = async (method, params) => {
const res = await fetch("https://services.carbium.sh", { method: "POST",
headers: { "content-type": "application/json", "x-api-key": KEY },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params: [params] }) });
const { result, error } = await res.json();
if (error) throw new Error(method + " failed: " + error.message);
return result;
};
const { quoteId } = await call("quote", { src_mint: SOL, dst_mint: USDC,
amount_in: "10000000", slippage_bps: 50 });
const { transaction } = await call("swap", { quote_id: quoteId,
user_pubkey: wallet.publicKey.toBase58() });
const connection = new Connection("https://services.carbium.sh", { commitment: "confirmed",
httpHeaders: { "x-api-key": KEY }, wsEndpoint: "wss://services.carbium.sh/?api-key=" + KEY });
const tx = VersionedTransaction.deserialize(Buffer.from(transaction, "base64"));
tx.sign([wallet]);
const sig = await connection.sendRawTransaction(tx.serialize(), { skipPreflight: true });
const { value } = await connection.confirmTransaction(sig, "confirmed");
if (value.err) throw new Error(JSON.stringify(value.err));
The router fee
Each swap pays a 0.05% router fee, collected on chain in the transaction the user signs and the same on every plan. Quotes add no fee; they count toward the Swap API plan's calls a second.
Swap API plansWhich plan for which app
Pick the plan by what the app does today, then move up when credits, request bursts or streams run short.
Free
$0a month
Build and test
Wire the loop and test it. getProgramAccounts and getTokenAccountsByOwner are served at a floor rate; no Carbon Stream.
- Requests a second, cached reads
- 5
- Credits, granted once
- 500K
- Streams on Carbon Stream
- None
Dev
Fits this app$20a month
Stream-driven services
Carbon Stream with 5 concurrent gRPC streams, so the app listens instead of polling.
- Requests a second, cached reads
- 30
- Credits a month
- 10M
- Streams on Carbon Stream
- 5
Business
$250a month
Several services
25 concurrent streams and 100 requests a second on cached reads.
- Requests a second, cached reads
- 100
- Credits a month
- 50M
- Streams on Carbon Stream
- 25
Pro
$500a month
Many services
100 concurrent streams and 500 requests a second on cached reads.
- Requests a second, cached reads
- 500
- Credits a month
- 200M
- Streams on Carbon Stream
- 100
Plans are bought on carbium.sh. Prices are in US dollars; card through Stripe is the main way to pay. You can also pay in USDC or USDT from your own wallet. The Carbium Swap API (the Quote module on carbium.sh) runs on the same key with its own plans, from Free at 10 calls a second to Elite at 500 for $104 a month.
What breaks in production
Always-on apps usually fail for boring reasons: stale reads, bursty retries, expired blockhashes and exposed keys.
Back off on 429
Use exponential backoff with jitter. A 429 means requests arrived faster than the plan allows, not that the key is broken.
Rate limits and 429sCheck before you resend
Never blindly retry a send. Check the signature's status first: the first send may already have landed.
Sign and send a swapRefresh the blockhash
A transaction built on an expired blockhash cannot land. Rebuild and re-quote instead of resending the old one.
Blockhash expiry recoveryPick the commitment
Read and confirm at the level your app can trust: processed, confirmed or finalized.
Commitment levelsPlan the failover
Keep a second endpoint and a switch you have tested, so one outage does not stop the app.
RPC failover checklistKeep keys server-side
Your Carbium key and signing keys belong in backend services you control, never in a browser.
API key security
Start from a working pattern
Three guides in the Carbium docs, each one a piece of the loop you can build on.
Quote to swap integration
The whole path in one guide: request a quote, get the unsigned transaction, sign it, send it and confirm it.
Watch your RPC usage
Track credits and request rates, so an always-on service moves up a plan before it runs into its limits.
Carbium for wallet developers
The same surfaces for a wallet: balance reads, signature subscriptions and swap quotes.
Questions
The docs cover each piece of the loop. For anything else, talk to the team on the Carbium Discord.
RPC quick start, in the docsWhich Carbium RPC plan suits an automated app?
Start on Free to wire and test the loop; getProgramAccounts and getTokenAccountsByOwner are served there at a floor rate, and there is no Carbon Stream. Dev ($20 a month, 10M credits, 30 requests a second on cached reads) adds native gRPC with 5 concurrent streams. Business ($250, 50M credits, 100 a second) has 25 streams, and Pro ($500, 200M credits, 500 a second) has 100. Plans are bought on carbium.sh. Prices are in US dollars; card through Stripe is the main way to pay. You can also pay in USDC or USDT from your own wallet.
Compare Carbium RPC plansCan I use an existing Yellowstone gRPC client?
Yes. Carbon Stream is native Yellowstone gRPC over HTTP/2 at https://services.carbium.sh:9443 with your key in the x-token metadata, so an existing Yellowstone client works by changing the endpoint and the token.
Carbon Stream: Solana gRPC on CarbiumHow many streams can an app open?
Dev includes 5 concurrent streams, Business 25 and Pro 100, counted across all the account's keys. Streams use plan credits: 5 to 200 credits when a stream opens, by its filter, then 20 credits per MiB streamed.
Do Carbium RPC and the Swap API share a key?
Yes. One key from carbium.sh works for JSON-RPC, WebSocket, Carbon Stream and the Carbium Swap API, all on services.carbium.sh. The Swap API is the Quote module on carbium.sh and has its own plans.
How does an app get a swap transaction to sign?
Call quote on https://services.carbium.sh with src_mint, dst_mint, amount_in and slippage_bps, then, within 30 seconds, swap with its quoteId as quote_id and your wallet as user_pubkey. swap answers an unsigned base64 transaction in transaction: deserialize it, sign it in your service, send it through Carbium RPC and confirm it.
Quote to swap integration guideWhat does the Carbium Swap API cost?
Plans set the rate, in calls a second per account: Free at 10, Starter at $7 a month (50), Pro at $28 (150) and Elite at $104 (500). Each swap also pays a 0.05% router fee, collected on chain in the transaction the user signs, and the same on every plan. Quotes add no fee.
Swap API plansWhat happens when my app hits a rate limit?
It gets a 429 Too Many Requests. Back off with jitter, check a transaction's status before resending it, and move to a larger plan once bursts are part of normal traffic rather than load tests.
Rate limits and 429 responsesHow much latency should I expect?
It depends on where your app runs and what it subscribes to, so measure from your own region before you commit. The benchmark guide shows how to measure RPC latency and slot freshness from your servers; time the stream the same way.
How to measure from your regionWire the loop free, then stream on Dev
Build and test on the Free plan. When the app needs the stream, Dev adds Carbon Stream, native Yellowstone gRPC, with 5 concurrent streams, 10M credits a month and 30 requests a second on cached reads. Plans are bought on carbium.sh. Prices are in US dollars; card through Stripe is the main way to pay. You can also pay in USDC or USDT from your own wallet.
Carbon Stream: Solana gRPC on Carbium