Q1
Use Carbium Q1 to request live Solana swap quotes and, when needed, an executable transaction payload from the current /api/v2/quote flow.
Q1
Use Q1 when you need Carbium's current executable quote flow, not the older v1 quote and swap request family.
Q1 is the documented GET /api/v2/quote surface for:
- live route and output calculation
- route-plan inspection before signing
- an executable
txnpayload whenuser_accountis included
Part of the Carbium Solana infrastructure stack.
What this page owns
This page owns the current v2 quote flow only:
| Surface | What it does |
|---|---|
GET https://api.carbium.io/api/v2/quote | Returns quote data for a swap request and can include a base64 transaction payload |
Use other pages when the question changes:
- use Get your API key for portal setup and key creation
- use Executing Swaps for sign -> submit -> confirm
- use Swap API Errors Reference for auth, route, or missing-
txnfailures
If you are maintaining the older parameter family with fromMint, toMint, and amount, stay on the older v1 reference pages instead of mixing request styles.
Request shape
Method: GET
URL:
https://api.carbium.io/api/v2/quoteHeader:
X-API-KEY: YOUR_API_KEY| Parameter | Required | Meaning |
|---|---|---|
src_mint | Yes | Input token mint |
dst_mint | Yes | Output token mint |
amount_in | Yes | Raw input amount in smallest units |
slippage_bps | Yes | Slippage tolerance in basis points |
user_account | No | Wallet address for an executable transaction response |
Q1 uses
src_mint,dst_mint,amount_in, andslippage_bps. Do not mix these withfromMint,toMint,amount, orslippagefrom the olderv1surfaces.
Minimal quote request
Use this when you only need pricing and route data:
curl --request GET \
--url 'https://api.carbium.io/api/v2/quote?src_mint=So11111111111111111111111111111111111111112&dst_mint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount_in=1000000&slippage_bps=50' \
--header 'X-API-KEY: YOUR_API_KEY'Use this when you need an executable transaction back:
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'The important difference is user_account:
- without it, Q1 can behave like a quote-only surface
- with it, the response can include
txn, a base64-encoded transaction payload ready for deserialization and signing
Response fields that matter
Typical Q1 responses include fields like these:
| Field | Why it matters |
|---|---|
srcAmountIn | Confirms the raw input amount used for routing |
destAmountOut | Expected output amount |
destAmountOutMin | Minimum output after slippage |
priceImpactPct | Quick price-impact sanity check |
routePlan | Route composition before signing |
txn | Base64 transaction payload when user_account is present |
Example response shape:
{
"srcAmountIn": "1000000",
"destAmountOut": "1257091",
"destAmountOutMin": "1257091",
"slippage": "50",
"priceImpactPct": "0",
"routePlan": [
{
"swap": "Raydium",
"percent": 100
}
],
"txn": "AQAAAA..."
}Treat txn as the handoff into your signing and submission flow, not as proof that the swap already landed on-chain.
Typical integration flow
Use this order for most new integrations:
- request a quote from Q1
- inspect output amount, minimum amount, and route plan
- include
user_accountwhen you need an executable transaction - deserialize and sign the returned
txn - submit and confirm through Carbium RPC
const url = new URL("https://api.carbium.io/api/v2/quote");
url.searchParams.set("src_mint", inputMint);
url.searchParams.set("dst_mint", outputMint);
url.searchParams.set("amount_in", amountIn);
url.searchParams.set("slippage_bps", "50");
url.searchParams.set("user_account", wallet.publicKey.toBase58());
const quote = await fetch(url, {
headers: { "X-API-KEY": process.env.CARBIUM_API_KEY! },
}).then((r) => r.json());
if (!quote.txn) {
throw new Error("Missing executable transaction in Q1 response");
}This page stops at the quote-build boundary. Move to Executing Swaps for the signing and RPC submission stage.
Validation checklist before production
- send
X-API-KEYon every request - use
src_mint,dst_mint,amount_in, andslippage_bpstogether - send amounts in smallest units
- require
user_accountif your integration expectstxn - fail fast if the quote returns no route or no executable payload
Use Q1 for the current executable quote flow, then move into Executing Swaps once the quote response looks correct. For platform setup and product access, start at carbium.io.
Updated about 1 month ago
