Carbium API

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.

Use this page as the command map for Carbium Swap API. It tells you which command family to start with, which parameter names belong together, and where to go for the full guide or API reference.

Part of the Carbium Solana infrastructure stack.


Pick the command by job

Job Command Best starting page API reference
Get a current quote and optionally build an executable transaction GET /api/v2/quote Q1 Get / Quote
Build a transaction through the older direct swap surface GET /api/v1/swap Swap Get / Swap
Compare quotes across documented providers GET /api/v1/quote/all All Quote Get / All Quote
Build a standalone custom-fee transaction GET /api/v1/fee/custom Custom Fee Get / Custom Fee
Submit a signed transaction through the bundle path GET /api/v1/swap/bundle Txn Bundle Get / Txn Bundle

For most new integrations, start with Q1. The older v1 command family is still documented and useful when you are maintaining provider-specific swap paths, all-quote comparisons, custom fee flows, or bundle submission.


Do not mix request families

Carbium's current docs expose two parameter styles. Keep each style with its matching base path.

Family Base path Parameter style
Current Q1 flow https://api.carbium.io/api/v2/quote src_mint, dst_mint, amount_in, slippage_bps, optional user_account
Older v1 quote and swap flow https://api.carbium.io/api/v1/* fromMint, toMint, amount, slippage, plus endpoint-specific fields

๐Ÿ“˜ If a request fails, check the endpoint family before changing the token pair or slippage. Sending fromMint to Q1, or src_mint to a v1 endpoint, creates avoidable debugging noise.


Minimal command examples

Q1 quote and transaction build

Use Q1 when you want the current quote surface and an optional executable txn payload.

curl --request GET \
  --url 'https://api.carbium.io/api/v2/quote?src_mint=So11111111111111111111111111111111111111112&dst_mint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount_in=1000000&slippage_bps=50&user_account=YOUR_WALLET' \
  --header 'X-API-KEY: YOUR_API_KEY'

Use Q1 for the full request and response shape. Use Executing Swaps after you receive a transaction payload and need to sign, submit, and confirm it.

Older direct swap build

Use the older direct swap surface when you are working with the documented v1 provider and execution-flag fields.

curl --request GET \
  --url 'https://api.carbium.io/api/v1/swap?owner=YOUR_WALLET&fromMint=So11111111111111111111111111111111111111112&toMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=1000000&slippage=50&provider=raydium' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --header 'accept: text/plain'

The v1 swap reference also documents optional fields such as pool, feeLamports, feeReceiver, priorityMicroLamports, mevSafe, and gasless.

All quote comparison

Use all quote when you want provider-by-provider quote visibility instead of one executable flow.

curl --request GET \
  --url 'https://api.carbium.io/api/v1/quote/all?fromMint=So11111111111111111111111111111111111111112&toMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=1000000&slippage=50' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --header 'accept: text/plain'

An all-quote response can include valid results for some providers and route misses for others. Treat provider-level misses as routing signals, not as proof that the whole API is unavailable.


Command map by integration stage

Stage Use this Stop when
Authenticate Get your API key Your backend can send X-API-KEY successfully
Quote GET /api/v2/quote or GET /api/v1/quote/all You have a route, output amount, and slippage boundary
Build transaction Q1 with user_account, or GET /api/v1/swap You have a base64 transaction payload
Sign Your wallet, backend signer, or custody flow The transaction is signed by the required signer
Submit Carbium RPC or the documented bundle path You have a transaction signature, bundle id, or failure reason
Debug Swap API Errors Reference You know whether the failure is auth, routing, request shape, signing, or RPC submission

This page stops at command selection. It does not replace the endpoint reference, the Q1 guide, or the execution guide.


Fast checks before opening a support thread

  • Confirm the API key belongs to Swap API access, not RPC access.
  • Send the key in the X-API-KEY header.
  • Keep Q1 parameter names on the v2 path.
  • Keep fromMint, toMint, amount, and slippage on the v1 paths.
  • Send amounts in smallest units.
  • Include user_account when your Q1 flow expects an executable txn.
  • Move to Swap API Errors Reference when auth, route, or request-shape failures appear before signing.

๐Ÿ”ถ Start with Q1 for new executable quote flows, then use carbium.io when you are ready to provision platform access or evaluate the full stack.