Stream real-time prices for multiple assets
curl --request POST \
--url https://streaming.dexpaprika.com/sse/prices \
--header 'Content-Type: application/json' \
--data '
[
{
"chain": "ethereum",
"address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"method": "token_price",
"request_id": 2147483647,
"filter": {}
}
]
'import requests
url = "https://streaming.dexpaprika.com/sse/prices"
payload = [
{
"chain": "ethereum",
"address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"method": "token_price",
"request_id": 2147483647,
"filter": {}
}
]
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: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
method: 'token_price',
request_id: 2147483647,
filter: {}
}
])
};
fetch('https://streaming.dexpaprika.com/sse/prices', 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/prices",
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' => '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
'method' => 'token_price',
'request_id' => 2147483647,
'filter' => [
]
]
]),
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/prices"
payload := strings.NewReader("[\n {\n \"chain\": \"ethereum\",\n \"address\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"method\": \"token_price\",\n \"request_id\": 2147483647,\n \"filter\": {}\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/prices")
.header("Content-Type", "application/json")
.body("[\n {\n \"chain\": \"ethereum\",\n \"address\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"method\": \"token_price\",\n \"request_id\": 2147483647,\n \"filter\": {}\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://streaming.dexpaprika.com/sse/prices")
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\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"method\": \"token_price\",\n \"request_id\": 2147483647,\n \"filter\": {}\n }\n]"
response = http.request(request)
puts response.read_body{
"address": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
"chain": "ethereum",
"price": "3456.78",
"timestamp": 1789721706,
"block_timestamp": 1789721700,
"token_price": 1789721706
}{
"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": {}
}{
"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": {}
}Streaming Endpoints
Stream real-time prices for multiple assets
Establishes a multiplexed SSE stream for up to 25 token price subscriptions in a single connection.
Emitted events: token_price · ping · warning · error
POST
/
sse
/
prices
Stream real-time prices for multiple assets
curl --request POST \
--url https://streaming.dexpaprika.com/sse/prices \
--header 'Content-Type: application/json' \
--data '
[
{
"chain": "ethereum",
"address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"method": "token_price",
"request_id": 2147483647,
"filter": {}
}
]
'import requests
url = "https://streaming.dexpaprika.com/sse/prices"
payload = [
{
"chain": "ethereum",
"address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"method": "token_price",
"request_id": 2147483647,
"filter": {}
}
]
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: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
method: 'token_price',
request_id: 2147483647,
filter: {}
}
])
};
fetch('https://streaming.dexpaprika.com/sse/prices', 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/prices",
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' => '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
'method' => 'token_price',
'request_id' => 2147483647,
'filter' => [
]
]
]),
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/prices"
payload := strings.NewReader("[\n {\n \"chain\": \"ethereum\",\n \"address\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"method\": \"token_price\",\n \"request_id\": 2147483647,\n \"filter\": {}\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/prices")
.header("Content-Type", "application/json")
.body("[\n {\n \"chain\": \"ethereum\",\n \"address\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"method\": \"token_price\",\n \"request_id\": 2147483647,\n \"filter\": {}\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://streaming.dexpaprika.com/sse/prices")
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\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"method\": \"token_price\",\n \"request_id\": 2147483647,\n \"filter\": {}\n }\n]"
response = http.request(request)
puts response.read_body{
"address": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
"chain": "ethereum",
"price": "3456.78",
"timestamp": 1789721706,
"block_timestamp": 1789721700,
"token_price": 1789721706
}{
"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": {}
}{
"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: Your first stream
Live token prices over SSE in a few minutes, no key for the showcase tokens.
Query Parameters
Body
application/json
Maximum array length:
25Response
Multiplexed SSE stream established.
- Option 1
- Option 2
- Option 3
- Option 4
Price update payload. Delivered on the token_price event channel.
Was this page helpful?