Stream real-time token OHLCV candles
curl --request GET \
--url https://streaming.dexpaprika.com/sse/ohlcvimport requests
url = "https://streaming.dexpaprika.com/sse/ohlcv"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://streaming.dexpaprika.com/sse/ohlcv', 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/ohlcv",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://streaming.dexpaprika.com/sse/ohlcv"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://streaming.dexpaprika.com/sse/ohlcv")
.asString();require 'uri'
require 'net/http'
url = URI("https://streaming.dexpaprika.com/sse/ohlcv")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"chain": "ethereum",
"token_id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"interval": "1s",
"timestamp": "2023-11-07T05:31:56Z",
"open": 1.234,
"high": 1.25,
"low": 1.22,
"close": 1.24,
"avg": 1.235,
"volume_usd": 15230.5,
"txns": 12
}{
"message": "asset not found"
}{
"message": "asset not found"
}API Reference
Stream real-time token OHLCV candles
Stream real-time token candles over SSE. Only frontend and enterprise callers are allowed.
GET
/
sse
/
ohlcv
Stream real-time token OHLCV candles
curl --request GET \
--url https://streaming.dexpaprika.com/sse/ohlcvimport requests
url = "https://streaming.dexpaprika.com/sse/ohlcv"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://streaming.dexpaprika.com/sse/ohlcv', 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/ohlcv",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://streaming.dexpaprika.com/sse/ohlcv"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://streaming.dexpaprika.com/sse/ohlcv")
.asString();require 'uri'
require 'net/http'
url = URI("https://streaming.dexpaprika.com/sse/ohlcv")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"chain": "ethereum",
"token_id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"interval": "1s",
"timestamp": "2023-11-07T05:31:56Z",
"open": 1.234,
"high": 1.25,
"low": 1.22,
"close": 1.24,
"avg": 1.235,
"volume_usd": 15230.5,
"txns": 12
}{
"message": "asset not found"
}{
"message": "asset not found"
}Query Parameters
Chain identifier
Token address. Required unless address is supplied.
Alias for token_id, accepted for consistency with the other SSE endpoints. Ignored when token_id is set.
Candle interval
Available options:
1s Optional request identifier
Required range:
0 <= x <= 4294967295Maximum event count
Required range:
x >= 1Response
Stream established successfully
- Option 1
- Option 2
- Option 3
Sealed token candle event
Chain identifier
Example:
"ethereum"
Token address
Example:
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
Candle interval
Example:
"1s"
Candle start time
Open price in USD
Example:
1.234
High price in USD
Example:
1.25
Low price in USD
Example:
1.22
Close price in USD
Example:
1.24
Average price in USD
Example:
1.235
Total volume in USD
Example:
15230.5
Number of swaps
Example:
12
Was this page helpful?