services

SDKs and tools

Carbium's SDKs, command line and agent tools are listed here, each with its version and install steps.

github.com/carbium-sh

Libraries

TypeScript

v0.1.1@carbium/sdk
npm install @carbium/sdk

Python

v0.1.0carbium
pip install carbium

Rust

v0.1.0carbium
cargo add carbium

Go

v0.1.0github.com/carbium-sh/carbium-go
go get github.com/carbium-sh/carbium-go

Spec files

v0.1.0spec
openrpc.json · openapi.json · Postman collection

Tools

Command line

v0.1.0carbium
npm install -g carbium

MCP server

v0.1.0@carbium/mcp
npx -y @carbium/mcp

Claude Code

v0.1.1Anthropic · carbium
claude plugin marketplace add carbium-sh/skills && claude plugin install carbium@carbium

Cursor

v0.1.1Cursor · carbium
carbium-solana-api

Codex

v0.1.1OpenAI · carbium
codex plugin marketplace add carbium-sh/skills

Cookbook

v0.1.0cookbook
10 recipes · TypeScript · Python · Rust · Go

Starters

v0.1.0starters
npm create carbium-app@latest my-app -- --template node-indexer

GitHub

carbium-sh
every Carbium repo
01

Spec files

Machine-readable descriptions of the services: an OpenRPC document for every JSON-RPC method and subscription, the account API's OpenAPI file and a Postman collection.

The spec repo holds machine-readable descriptions of the methods served at services.carbium.sh. There is nothing to install: a tool reads the files from GitHub.

What it holds

The repo has five files:

  • openrpc.json: an OpenRPC 1.4 document with every RPC, DAS and quote method, and every WebSocket subscription with its unsubscribe. Each method has its params, its result and one example.
  • served.json: the names of everything the services serve: methods, the REST quote route, subscriptions, Carbon Stream filters and calls, DCA and token routes.
  • examples.json: one example params value per method. A value in angle brackets is a placeholder to replace.
  • carbium.postman_collection.json: a Postman collection with one request per RPC, DAS and quote method, one for the REST quote route, and one per account API call.
  • openapi.json: a copy of the account API description served at carbium.sh/openapi.json, which the collection is built from.

Point an OpenRPC tool at the raw file.

spec · openrpc.url
https://raw.githubusercontent.com/carbium-sh/spec/main/openrpc.json

Use the OpenRPC document

A tool reads each method's params, result schema and example from the document. This fetches it and lists the method names.

spec · openrpc.sh
curl -sL https://raw.githubusercontent.com/carbium-sh/spec/main/openrpc.json -o openrpc.jsonjq -r '.methods[].name' openrpc.json

Postman

Import the collection in Postman. Put serviceKey (a c_serv_ key, for the JSON-RPC and REST folders) and accountKey (a c_acct_ key, for the account API folder) in a Postman environment as current values, or in the Postman Vault, so a key does not leave with an exported collection. The file ships with both empty. The folder "Changes the account" creates and removes keys and webhooks, so do not run the whole collection.

spec · postman.url
https://raw.githubusercontent.com/carbium-sh/spec/main/carbium.postman_collection.json

Check it against the service

With Node 22.18 or later, pnpm and a service key in CARBIUM_KEY, scripts/live-check.mjs calls every cheap HTTPS method in openrpc.json once, one call a second, and checks each answer against that method's result schema. It exits 0 when every call matched, 1 on a mismatch or a method the services do not serve, 2 without a key, and 3 when any call is still unread after its one retry.

spec · live-check.sh
git clone https://github.com/carbium-sh/spec.gitcd specpnpm install --ignore-scriptsexport CARBIUM_KEY="<your c_serv_ key>"node scripts/live-check.mjs

carbium-sh/spec on GitHub · openrpc.json · carbium.postman_collection.json · Account API description · Carbium docs

02

Agent plugin

Carbium's API guides as skills for Claude Code, Cursor and Codex.

The carbium plugin gives your coding agent two of Carbium's guides as skills, in Claude Code, Cursor and Codex. It installs from the GitHub repository carbium-sh/skills.

What it is

One plugin holds two skills. Each skill is its published guide word for word, cut at its sections: a short SKILL.md with the opening sections and a table of the reference files, and one file per other section under references/.

plugins · skills.txt
plugins/carbium/skills/  carbium-solana-api/    SKILL.md    references/  carbium-dca/    SKILL.md    references/

Claude Code

Add the marketplace and install the plugin from your shell. In a session, run /plugin marketplace add carbium-sh/skills and then /plugin install carbium@carbium.

plugins · claude-code.sh
claude plugin marketplace add carbium-sh/skillsclaude plugin install carbium@carbium

Cursor

Open "Customize", import the repository with "From GitHub Repository", then install carbium and pick a project or user scope. To try it locally, copy plugins/carbium from the repository to ~/.cursor/plugins/local/carbium and run "Developer: Reload Window".

plugins · cursor.sh
mkdir -p ~/.cursor/plugins/local && cp -r plugins/carbium ~/.cursor/plugins/local/carbium

Codex

Add the marketplace from your shell. Then start codex, enter /plugins, install carbium from the Carbium marketplace and open a new session.

plugins · codex.sh
codex plugin marketplace add carbium-sh/skills

Other agents

Agents that read SKILL.md files can take both skills with the skills command line. It finds the two skills in the repository and asks which agents to install them for; --yes and --agent <name> skip the questions.

plugins · skills.sh
npx skills add carbium-sh/skills

What the skills cover

  • carbium-solana-api: JSON-RPC, WebSocket subscriptions, the Yellowstone gRPC stream and the quote API at services.carbium.sh, which returns route quotes and one unsigned transaction for your own wallet to sign, with sign-up, auth, limits, prices, errors and JavaScript clients.
  • carbium-dca: the DCA API at dex.carbium.io, to open, read, pause and close orders that buy a token on a schedule on Solana; each call builds one unsigned transaction that the owner's wallet signs.

Updates

When a guide changes, the skills are rebuilt from it and the plugin's version goes up. Claude Code keeps an installed plugin on its cached copy until that version changes. Refresh the marketplace, update the plugin, then restart Claude Code to apply it.

plugins · update.sh
claude plugin marketplace update carbiumclaude plugin update carbium@carbium

carbium-sh/skills on GitHub · carbium.sh/skill.md · DCA guide

03

Cookbook

Ten small tasks against the services, each as one short runnable file in TypeScript, Python, Rust and Go.

The cookbook holds short examples that call Carbium's services, one task per folder, each written in TypeScript, Python, Rust and Go. Each example needs the Carbium SDK for its language, and each one that calls a service reads a service key from CARBIUM_KEY. The webhook recipe runs offline with no key.

What it is

There are ten recipes, each in four languages. The repo's own check, scripts/check.mjs --all, runs every recipe against services.carbium.sh and checks the last line each one prints against its recipe.json. This is the layout of one recipe.

cookbook · layout.txt
rpc/get-balance/  recipe.json        title, summary, the calls it makes, the keys it reads, the keys its output holds  README.md  typescript/        main.ts, package.json  python/            main.py  rust/              Cargo.toml, src/main.rs  go/                go.mod, main.go

Recipes

  • Get a wallet's SOL balance: read one wallet's balance in lamports and SOL with getBalance.
  • Look up a transaction: take a recent signature, read its status, then the transaction itself.
  • Page through a wallet's history: read an address's signatures two pages deep, with a before cursor and with a page token.
  • List a wallet's tokens and NFTs: page through everything one wallet holds with getAssetsByOwner, 10 assets a page.
  • Read a token: read a mint's name and symbol, its supply and one holder's balance.
  • Follow a wallet over WebSocket: subscribe to a wallet's transactions, read its balance, take one notification and unsubscribe.
  • Quote a swap: quote 0.01 SOL to USDC: the amount out, the floor, the route and the fee.
  • Build an unsigned swap: quote 0.01 SOL to USDC and build one unsigned transaction for your own wallet to sign, with what it costs.
  • Read USD prices: read the USD price of a few mints with one prices call.
  • Verify a webhook delivery: check a delivery's signature with the SDK, offline, and see one changed byte refused.

Clone the repo and enter one recipe.

cookbook · clone.sh
git clone https://github.com/carbium-sh/cookbook.gitcd cookbook/rpc/get-balance

Run it in TypeScript

From the recipe's folder, with Node 24 and your service key from the dashboard in CARBIUM_KEY.

cookbook · run-typescript.sh
cd typescriptnpm installexport CARBIUM_KEY="<your c_serv_ key>"node main.ts

Run it in Python

From the recipe's folder, with Python 3.11 or later and your service key from the dashboard in CARBIUM_KEY.

cookbook · run-python.sh
cd pythonpip install carbiumexport CARBIUM_KEY="<your c_serv_ key>"python main.py

Run it in Rust

From the recipe's folder, with your service key from the dashboard in CARBIUM_KEY. Cargo fetches the carbium crate on the first run.

cookbook · run-rust.sh
cd rustexport CARBIUM_KEY="<your c_serv_ key>"cargo run

Run it in Go

From the recipe's folder, with your service key from the dashboard in CARBIUM_KEY. The example builds first because go run . exits 1 whatever the example's exit code was.

cookbook · run-go.sh
cd gogo mod tidyexport CARBIUM_KEY="<your c_serv_ key>"go build -o example ../example

What an example prints

An example prints one line of JSON and exits 0. When the service refuses a call, it prints the HTTP status, the error code and the message as one line of JSON on stderr and exits 1. Without the key it needs, it says which one to set and exits 2. This is the line the balance recipe printed for one wallet.

cookbook · output.json
{"wallet":"5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9","lamports":65859023956,"sol":65.859023956,"slot":472460941}

carbium-sh/cookbook on GitHub · Get a wallet's SOL balance recipe · carbium-sh/spec on GitHub · Carbium docs

04

Starters

Six small projects that call Carbium's services end to end, in TypeScript, Python, Rust and Go. Each one runs on its own once copied, and reads its key from a file that it never commits.

Create a project

The scaffolder copies one starter into a new, empty folder and prints the steps to run it. It never installs anything, never runs git and never overwrites a file.

starters · create.sh
npm create carbium-app@latest my-app -- --template node-indexer# create-carbium-app 0.1.0# Created my-app from the node-indexer starter.

Next.js dapp

A page that connects a browser wallet, shows its SOL and tokens with USD values and quotes a swap. The server builds the unsigned transaction and the user's wallet signs and sends it. The key stays in the server routes and works on the FREE plan.

starters · nextjs-dapp.sh
npm create carbium-app@latest my-nextjs-dapp -- --template nextjs-dappcd my-nextjs-dappnpm installcp .env.example .env   # then set CARBIUM_KEYnpm run buildnpm startcurl -s 'http://localhost:3000/api/portfolio?owner=MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr'# {"solUsd":69.190526,"tokens":[...

Node indexer

Streams every transaction that touches one program from Carbon Stream into Postgres. It backfills one page over RPC at start and after a reconnect that could not resume. It needs the DEV plan and a key with the grpc and rpc scopes.

starters · node-indexer.sh
npm create carbium-app@latest my-indexer -- --template node-indexercd my-indexercp .env.example .env   # then set CARBIUM_KEY and DATABASE_URLnpm installnpm start# backfill 1000 signatures, 1000 new# tx 472448393 4HkGWGq23e76pnKKDG1BqzYmMHwzXV6TuMZtyBa6pi3LBguX4yrS4tDcXs5oesrkfgaM8LowbVw9mkF9qxXVsSoD ok

Python data pipeline

Loads a wallet's transaction history (slot, time, status, fee and SOL change) into SQLite and a CSV. Each run adds only what is new, then exits. It works on the FREE plan.

starters · python-pipeline.sh
npm create carbium-app@latest my-pipeline -- --template python-pipelinecd my-pipelinepython3 -m venv .venv && . .venv/bin/activatepip install -r requirements.txtcp .env.example .env   # then set CARBIUM_KEYLIMIT=1 python pipeline.py# {"wallet": "5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9", "added": 1, "waiting": 0, "rows": 1, "gap": false, "database": "history.db", "csv": "history.csv"}

Rust stream

Prints each slot, and each transaction that touches the watched accounts, from Carbon Stream as one JSON line on stdout. It needs the DEV plan and a key with the grpc scope.

starters · rust-stream.sh
npm create carbium-app@latest my-rust-stream -- --template rust-streamcd my-rust-streamcp .env.example .env   # then set CARBIUM_KEYcargo run# {"type":"slot","slot":472449027,"parent":472449026}# {"type":"tx","slot":472448816,"signature":"5QxfTUHd324MLEhoe2YMNX4SqjhrMuriSyMwPhHmfk8sXCY763C67UyQtL7GB4mGkPfKpxnuNntJ481pM36pomh1","ok":false,"fee":5005}

Wallet notifier

Watches up to 10 wallets over a WebSocket and posts one Discord or Slack line, with a link, for each of their transactions. It works on the FREE plan.

starters · wallet-notifier.sh
npm create carbium-app@latest my-notifier -- --template wallet-notifiercd my-notifierpython3 -m venv .venv && . .venv/bin/activatepip install -r requirements.txtcp .env.example .env   # then set CARBIUM_KEY and WATCH_ADDRESSESpython notifier.py# watching 5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9 65.859023956 SOL at slot 472447188

Webhook receiver

Receives Carbium webhook deliveries in Go, checks each signature over the raw body, answers 200 and logs one JSON line per transaction. A delivery that fails the check gets 401. Webhooks need the DEV plan.

starters · webhook-receiver.sh
npm create carbium-app@latest my-receiver -- --template webhook-receivercd my-receivergo mod tidy && go buildcp .env.example .env   # then set CARBIUM_WEBHOOK_SECRET, the webhook's whsec_ secret./carbium-webhook-receiver# listening on :8080, POST /webhooks/carbium

What a starter never does

A starter never keeps a key in a file it commits: each one reads its key from .env, which its own .gitignore leaves out. No starter holds a private key, signs or sends a transaction, runs on a timer or watches prices. In the Next.js dapp the user's own wallet signs and sends.

starters · .gitignore
.env.env.*!.env.example

Starters on GitHub · create-carbium-app on npm