Skip to main content

Get Quote

GET /api/v1/quote returns the best swap route for a token pair, including estimated amounts, price impact, fee breakdown, and route details.

Parameters

inputMint
string
required
Input token mint address (base58-encoded public key).
outputMint
string
required
Output token mint address (base58-encoded public key).
amount
string
required
Amount in smallest token units. For FOGO (9 decimals): 1000000000 = 1 FOGO. For USDC (6 decimals): 1000000 = 1 USDC.
swapMode
string
required
ExactIn: amount is the exact input, output is estimated. ExactOut: amount is the exact desired output, input is estimated.
slippageBps
integer
default:"50"
Slippage tolerance in basis points (1 bps = 0.01%). Default: 50 (0.5%).

Example

curl "https://api.vulcx.xyz/api/v1/quote?\
inputMint=So11111111111111111111111111111111111111112&\
outputMint=uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG&\
amount=1000000000&\
swapMode=ExactIn&\
slippageBps=50" \
  -H "Authorization: Bearer $VULCX_KEY"
const params = new URLSearchParams({
  inputMint: "So11111111111111111111111111111111111111112",
  outputMint: "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG",
  amount: "1000000000",
  swapMode: "ExactIn",
  slippageBps: "50",
});

const response = await fetch(
  `https://api.vulcx.xyz/api/v1/quote?${params}`,
  { headers: { Authorization: `Bearer ${process.env.VULCX_KEY}` } }
);
const { success, data, error } = await response.json();

if (!success) throw new Error(error);

console.log(`Output: ${data.amountOut}`);
console.log(`Price impact: ${data.priceImpactPercent}`);
console.log(`Route: ${data.hopCount} hop(s) via ${data.routes.map(r => r.poolType).join(" → ")}`);
import os, requests

resp = requests.get(
    "https://api.vulcx.xyz/api/v1/quote",
    params={
        "inputMint": "So11111111111111111111111111111111111111112",
        "outputMint": "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG",
        "amount": "1000000000",
        "swapMode": "ExactIn",
        "slippageBps": "50",
    },
    headers={"Authorization": f"Bearer {os.environ['VULCX_KEY']}"},
)
result = resp.json()
if not result["success"]:
    raise Exception(result["error"])

data = result["data"]
print(f"Output: {data['amountOut']}")
print(f"Price impact: {data['priceImpactPercent']}")
pool_types = " → ".join(r["poolType"] for r in data["routes"])
print(f"Route: {data['hopCount']} hop(s) via {pool_types}")

Response

{
  "success": true,
  "data": {
    "inputMint": "So11111111111111111111111111111111111111112",
    "outputMint": "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG",
    "amountIn": "1000000000",
    "amountOut": "145320000",
    "priceImpactBps": 25,
    "priceImpactPercent": "0.25%",
    "priceImpactSeverity": "low",
    "priceImpactWarning": "Price impact is low",
    "feeBps": 25,
    "routes": [
      {
        "poolAddress": "HJPjoWUrhoZzkNfRpHuieeFk9WcZWjwy6PBjZ81ngndJ",
        "poolType": "Vortex",
        "percent": 100,
        "inputMint": "So11111111111111111111111111111111111111112",
        "outputMint": "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG"
      }
    ],
    "routePath": [
      "So11111111111111111111111111111111111111112",
      "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG"
    ],
    "hopCount": 1,
    "otherAmountThreshold": "144593400"
  }
}
{
  "success": false,
  "error": "no route found"
}

Response fields

inputMint
string
Input token mint address.
outputMint
string
Output token mint address.
amountIn
string
Input amount in smallest units. For ExactIn: same as requested. For ExactOut: calculated.
amountOut
string
Output amount in smallest units. For ExactIn: calculated. For ExactOut: same as requested.
priceImpactBps
integer
Price impact in basis points.
priceImpactPercent
string
Human-readable price impact (e.g., "0.25%").
priceImpactSeverity
string
Severity classification:
ValueRange
none< 0.1%
low0.1% – 1%
moderate1% – 3%
high3% – 5%
extreme> 5%
priceImpactWarning
string
Warning message. Empty if impact is negligible.
feeBps
integer
Total pool fee across all hops in basis points.
routes
RouteInfo[]
Array of hops in the route.
routePath
string[]
Token path from input to output. Direct: [inputMint, outputMint]. Multi-hop: [inputMint, ...intermediates, outputMint].
hopCount
integer
Number of hops. 1 = direct swap, 2+ = multi-hop.
otherAmountThreshold
string
Slippage-adjusted threshold. ExactIn: minimum output you’ll receive. ExactOut: maximum input you’ll spend.

Price impact guidance

  • none / low: Safe to proceed.
  • moderate: Consider splitting into smaller trades.
  • high / extreme: Large trade relative to available liquidity. Review carefully before proceeding. The priceImpactWarning field will contain a human-readable message.
Last modified on July 5, 2026