Skip to main content
GET
/
v1
/
quote
curl -G "https://api.unipay.com/v1/quote" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "inputAsset=SOL" \
  -d "outputAsset=USDC" \
  -d "amount=10" \
  -d "mode=private" \
  -d "slippageBps=100"
{
  "quoteId": "quote_1234567890abcdef",
  "inputAsset": "SOL",
  "outputAsset": "USDC", 
  "inputAmount": "10.0",
  "outputAmount": "1847.25",
  "minOutputAmount": "1828.78",
  "priceImpact": 0.15,
  "fee": "0.92",
  "mode": "private",
  "expiresAt": "2026-04-22T12:15:00Z"
}
Get real-time pricing for token swaps and transfers. Quotes include price impact, fees, and slippage protection.

Parameters

inputAsset
string
required
Input asset symbol. Supported: SOL, USDC, USDT
outputAsset
string
required
Output asset symbol. Supported: SOL, USDC, USDT
amount
number
required
Input amount. Minimum: 0.001
mode
string
default:"wallet"
Execution mode: wallet (direct) or private (privacy-enhanced)
slippageBps
integer
default:"100"
Slippage tolerance in basis points (1-5000). 100 = 1%

Response

quoteId
string
Unique quote identifier for transaction submission
inputAsset
string
Input asset symbol
outputAsset
string
Output asset symbol
inputAmount
string
Input amount as string to preserve precision
outputAmount
string
Expected output amount
minOutputAmount
string
Minimum output amount after slippage protection
priceImpact
number
Price impact percentage (0.1 = 0.1%)
fee
string
Total fees (network + routing if applicable)
mode
string
Execution mode: wallet or private
expiresAt
string
Quote expiration timestamp (ISO 8601)
curl -G "https://api.unipay.com/v1/quote" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "inputAsset=SOL" \
  -d "outputAsset=USDC" \
  -d "amount=10" \
  -d "mode=private" \
  -d "slippageBps=100"
{
  "quoteId": "quote_1234567890abcdef",
  "inputAsset": "SOL",
  "outputAsset": "USDC", 
  "inputAmount": "10.0",
  "outputAmount": "1847.25",
  "minOutputAmount": "1828.78",
  "priceImpact": 0.15,
  "fee": "0.92",
  "mode": "private",
  "expiresAt": "2026-04-22T12:15:00Z"
}

Quote Expiration

Quotes expire to protect against price volatility:
ModeExpiration
Wallet30 seconds
Private60 seconds

Price Impact

Large swaps may experience price impact:
Swap SizeTypical Impact
< 10 SOL< 0.1%
10-100 SOL0.1-0.5%
100-1000 SOL0.5-2%
> 1000 SOL> 2%

Error Responses

error.code
string
Error code identifier
error.message
string
Human-readable error message
error.details
object
Additional error context

Common Errors

CodeDescription
INVALID_ASSETUnsupported asset symbol
AMOUNT_TOO_SMALLBelow minimum amount
INSUFFICIENT_LIQUIDITYNot enough liquidity for swap
RATE_LIMIT_EXCEEDEDToo many requests