Messages
{
"type": "subscribe",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": 100000000,
"slippageBps": "50"
}{
"type": "unsubscribe",
"id": "sub_1791374181484151"
}{
"type": "ping"
}{
"type": "subscribed",
"id": "sub_1791374181484151"
}{
"type": "quote",
"id": "sub_1791374181484151",
"timestamp": 1791374181491,
"searchMode": "fast",
"data": {
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amountIn": "100000000",
"amountOut": "11703794",
"minAmountOut": "11645275",
"priceImpact": 0,
"slippageBps": 50,
"routePlan": [
{
"programId": "9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp",
"dex": "Humidifi",
"pool": "8sKQHfjNhvmAw94PhfvfMcytmqW6jmxvwieYyzXCCPu",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amountIn": "100000000",
"amountOut": "11703794",
"priceImpact": 0,
"percent": 100
}
],
"swapUsdValue": "11.72",
"contextSlot": 454215875,
"timeTaken": 0.0028,
"quoteId": "Adu55-vpeyHCzw7AuzdKYNkSEGa-3GjpmQNBjtDs6SIy"
}
}{
"type": "unsubscribed",
"id": "sub_1791374181484151",
"success": true
}{
"type": "pong",
"timestamp": 1791374181491
}{
"type": "error",
"error": "Invalid inputMint"
}Websockets
Quote stream
wss://raptor.solanatracker.io/stream
Live quotes for one or more token pairs. Use it to show prices. To get a transaction, pass a quote to POST /swap, or use the swap stream.
WSS
/
stream
Messages
{
"type": "subscribe",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": 100000000,
"slippageBps": "50"
}{
"type": "unsubscribe",
"id": "sub_1791374181484151"
}{
"type": "ping"
}{
"type": "subscribed",
"id": "sub_1791374181484151"
}{
"type": "quote",
"id": "sub_1791374181484151",
"timestamp": 1791374181491,
"searchMode": "fast",
"data": {
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amountIn": "100000000",
"amountOut": "11703794",
"minAmountOut": "11645275",
"priceImpact": 0,
"slippageBps": 50,
"routePlan": [
{
"programId": "9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp",
"dex": "Humidifi",
"pool": "8sKQHfjNhvmAw94PhfvfMcytmqW6jmxvwieYyzXCCPu",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amountIn": "100000000",
"amountOut": "11703794",
"priceImpact": 0,
"percent": 100
}
],
"swapUsdValue": "11.72",
"contextSlot": 454215875,
"timeTaken": 0.0028,
"quoteId": "Adu55-vpeyHCzw7AuzdKYNkSEGa-3GjpmQNBjtDs6SIy"
}
}{
"type": "unsubscribed",
"id": "sub_1791374181484151",
"success": true
}{
"type": "pong",
"timestamp": 1791374181491
}{
"type": "error",
"error": "Invalid inputMint"
}Subscribe
type:object
Start receiving quotes for a token pair
Unsubscribe
type:object
Stop a subscription
Ping
type:object
Keep the connection alive. The server answers with pong.
Subscribed
type:object
The subscription is active. Keep the id to match updates and to unsubscribe.
Quote
type:object
New best quote for a subscription
Unsubscribed
type:object
The subscription has stopped
Pong
type:object
Answer to ping
Error
type:object
A request was rejected, or a subscription could not produce an update. id is set when the error belongs to a subscription.
Was this page helpful?