curl --request POST \
--url https://streaming.dexpaprika.com/sse/transactions \
--header 'Content-Type: application/json' \
--data '
[
{
"chain": "ethereum",
"address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"request_id": 2147483647
}
]
'import requests
url = "https://streaming.dexpaprika.com/sse/transactions"
payload = [
{
"chain": "ethereum",
"address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"request_id": 2147483647
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{
chain: 'ethereum',
address: '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640',
request_id: 2147483647
}
])
};
fetch('https://streaming.dexpaprika.com/sse/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://streaming.dexpaprika.com/sse/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'chain' => 'ethereum',
'address' => '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640',
'request_id' => 2147483647
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://streaming.dexpaprika.com/sse/transactions"
payload := strings.NewReader("[\n {\n \"chain\": \"ethereum\",\n \"address\": \"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640\",\n \"request_id\": 2147483647\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://streaming.dexpaprika.com/sse/transactions")
.header("Content-Type", "application/json")
.body("[\n {\n \"chain\": \"ethereum\",\n \"address\": \"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640\",\n \"request_id\": 2147483647\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://streaming.dexpaprika.com/sse/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"chain\": \"ethereum\",\n \"address\": \"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640\",\n \"request_id\": 2147483647\n }\n]"
response = http.request(request)
puts response.read_body{
"chain": "ethereum",
"pool_id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"block_number": "19000000",
"block_timestamp": 1715162388,
"tx_hash": "0xabc123...",
"sender": "0xd3cda913deb6f0967b991b2d0a373199c2f7c90c",
"recipient": "0xd3cda913deb6f0967b991b2d0a373199c2f7c90c",
"token_0": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"token_1": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"amount_0": -1000,
"amount_1": 500000000,
"amount_0_usd": -1000.5,
"amount_1_usd": 998.75,
"price_0_usd": 1.0005,
"price_1_usd": 1997.5,
"volume_usd": 999.625
}{
"message": "asset not found",
"error": "preview_only",
"param": "<string>",
"expected": "<string>",
"allowed": [
"<string>"
],
"violations": [
{
"in": "query",
"param": "<string>",
"error": "unknown_param",
"expected": "<string>"
}
],
"tier": "keyless",
"links": {}
}{
"message": "asset not found",
"error": "preview_only",
"param": "<string>",
"expected": "<string>",
"allowed": [
"<string>"
],
"violations": [
{
"in": "query",
"param": "<string>",
"error": "unknown_param",
"expected": "<string>"
}
],
"tier": "keyless",
"links": {}
}Stream real-time swap transactions for multiple pools or tokens
Paid plans only. Available on Dev, Pro and Enterprise keys on https://streaming-pro.dexpaprika.com; keyless requests and free keys receive HTTP 403.
Establishes a multiplexed SSE stream for swap transactions across multiple pools or tokens within a single connection.
Stream Constraints: Maximum payload array length is 25 subscriptions.
Resume: same as GET. One since or Last-Event-ID covers all subscriptions. Missed swaps are capped at 500 per connection. When subscriptions span several chains, swaps from other chains than the one in Last-Event-ID may be sent again; dedupe by id.
Supported Channel Events: - pool: Swap transactions for a pool. Schema matches TransactionResponse. - token: Swap transactions involving a token. Schema matches TransactionResponse. - ping: Infrastructure keep-alive payload (PingEvent). - warning: System warning notifications (WarningEvent). - error: Stream-level operational exceptions (ErrorEvent).
curl --request POST \
--url https://streaming.dexpaprika.com/sse/transactions \
--header 'Content-Type: application/json' \
--data '
[
{
"chain": "ethereum",
"address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"request_id": 2147483647
}
]
'import requests
url = "https://streaming.dexpaprika.com/sse/transactions"
payload = [
{
"chain": "ethereum",
"address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"request_id": 2147483647
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{
chain: 'ethereum',
address: '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640',
request_id: 2147483647
}
])
};
fetch('https://streaming.dexpaprika.com/sse/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://streaming.dexpaprika.com/sse/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'chain' => 'ethereum',
'address' => '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640',
'request_id' => 2147483647
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://streaming.dexpaprika.com/sse/transactions"
payload := strings.NewReader("[\n {\n \"chain\": \"ethereum\",\n \"address\": \"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640\",\n \"request_id\": 2147483647\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://streaming.dexpaprika.com/sse/transactions")
.header("Content-Type", "application/json")
.body("[\n {\n \"chain\": \"ethereum\",\n \"address\": \"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640\",\n \"request_id\": 2147483647\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://streaming.dexpaprika.com/sse/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"chain\": \"ethereum\",\n \"address\": \"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640\",\n \"request_id\": 2147483647\n }\n]"
response = http.request(request)
puts response.read_body{
"chain": "ethereum",
"pool_id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"block_number": "19000000",
"block_timestamp": 1715162388,
"tx_hash": "0xabc123...",
"sender": "0xd3cda913deb6f0967b991b2d0a373199c2f7c90c",
"recipient": "0xd3cda913deb6f0967b991b2d0a373199c2f7c90c",
"token_0": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"token_1": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"amount_0": -1000,
"amount_1": 500000000,
"amount_0_usd": -1000.5,
"amount_1_usd": 998.75,
"price_0_usd": 1.0005,
"price_1_usd": 1997.5,
"volume_usd": 999.625
}{
"message": "asset not found",
"error": "preview_only",
"param": "<string>",
"expected": "<string>",
"allowed": [
"<string>"
],
"violations": [
{
"in": "query",
"param": "<string>",
"error": "unknown_param",
"expected": "<string>"
}
],
"tier": "keyless",
"links": {}
}{
"message": "asset not found",
"error": "preview_only",
"param": "<string>",
"expected": "<string>",
"allowed": [
"<string>"
],
"violations": [
{
"in": "query",
"param": "<string>",
"error": "unknown_param",
"expected": "<string>"
}
],
"tier": "keyless",
"links": {}
}Tutorial: Real-time swap transactions streaming
Headers
Query Parameters
Body
25Response
Multiplexed SSE stream successfully established.
- Option 1
- Option 2
- Option 3
- Option 4
Swap transaction event payload. Emitted on the pool or token event channel.
Was this page helpful?