Get real-time pricing for token swaps and transfers. Quotes include price impact, fees, and slippage protection.
Parameters
Input asset symbol. Supported: SOL, USDC, USDT
Output asset symbol. Supported: SOL, USDC, USDT
Input amount. Minimum: 0.001
Execution mode: wallet (direct) or private (privacy-enhanced)
Slippage tolerance in basis points (1-5000). 100 = 1%
Response
Unique quote identifier for transaction submission
Input amount as string to preserve precision
Minimum output amount after slippage protection
Price impact percentage (0.1 = 0.1%)
Total fees (network + routing if applicable)
Execution mode: wallet or private
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:
| Mode | Expiration |
|---|
| Wallet | 30 seconds |
| Private | 60 seconds |
Price Impact
Large swaps may experience price impact:
| Swap Size | Typical Impact |
|---|
| < 10 SOL | < 0.1% |
| 10-100 SOL | 0.1-0.5% |
| 100-1000 SOL | 0.5-2% |
| > 1000 SOL | > 2% |
Error Responses
Human-readable error message
Common Errors
| Code | Description |
|---|
INVALID_ASSET | Unsupported asset symbol |
AMOUNT_TOO_SMALL | Below minimum amount |
INSUFFICIENT_LIQUIDITY | Not enough liquidity for swap |
RATE_LIMIT_EXCEEDED | Too many requests |