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"
const response = await fetch('https://api.unipay.com/v1/quote?' + new URLSearchParams({
inputAsset: 'SOL',
outputAsset: 'USDC',
amount: '10',
mode: 'private',
slippageBps: '100'
}), {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const quote = await response.json();
import requests
response = requests.get('https://api.unipay.com/v1/quote',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'inputAsset': 'SOL',
'outputAsset': 'USDC',
'amount': 10,
'mode': 'private',
'slippageBps': 100
}
)
quote = response.json()
{
"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"
}
Quotes
Get Quote
Get pricing information for swaps and transfers with optional privacy protection
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"
const response = await fetch('https://api.unipay.com/v1/quote?' + new URLSearchParams({
inputAsset: 'SOL',
outputAsset: 'USDC',
amount: '10',
mode: 'private',
slippageBps: '100'
}), {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const quote = await response.json();
import requests
response = requests.get('https://api.unipay.com/v1/quote',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'inputAsset': 'SOL',
'outputAsset': 'USDC',
'amount': 10,
'mode': 'private',
'slippageBps': 100
}
)
quote = response.json()
{
"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
string
required
Input asset symbol. Supported:
SOL, USDC, USDTstring
required
Output asset symbol. Supported:
SOL, USDC, USDTnumber
required
Input amount. Minimum: 0.001
string
default:"wallet"
Execution mode:
wallet (direct) or private (privacy-enhanced)integer
default:"100"
Slippage tolerance in basis points (1-5000). 100 = 1%
Response
string
Unique quote identifier for transaction submission
string
Input asset symbol
string
Output asset symbol
string
Input amount as string to preserve precision
string
Expected output amount
string
Minimum output amount after slippage protection
number
Price impact percentage (0.1 = 0.1%)
string
Total fees (network + routing if applicable)
string
Execution mode:
wallet or privatestring
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"
const response = await fetch('https://api.unipay.com/v1/quote?' + new URLSearchParams({
inputAsset: 'SOL',
outputAsset: 'USDC',
amount: '10',
mode: 'private',
slippageBps: '100'
}), {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const quote = await response.json();
import requests
response = requests.get('https://api.unipay.com/v1/quote',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'inputAsset': 'SOL',
'outputAsset': 'USDC',
'amount': 10,
'mode': 'private',
'slippageBps': 100
}
)
quote = response.json()
{
"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
string
Error code identifier
string
Human-readable error message
object
Additional error context
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 |