Range target vs TWAP comparisons
curl --request GET \
--url https://api.vatic.trading/api/v1/twap/rangeimport requests
url = "https://api.vatic.trading/api/v1/twap/range"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vatic.trading/api/v1/twap/range', 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://api.vatic.trading/api/v1/twap/range",
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://api.vatic.trading/api/v1/twap/range"
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://api.vatic.trading/api/v1/twap/range")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vatic.trading/api/v1/twap/range")
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{
"asset": "btc",
"marketType": "5min",
"twapWindowSeconds": 30,
"startIso": "2026-07-28T16:00:00.000Z",
"endIso": "2026-07-31T16:00:00.000Z",
"expectedMarkets": 864,
"summary": {
"ok": 864,
"failed": 0,
"disagreements": 12,
"disagreementRate": 0.013888888888888888
}
}Chainlink TWAP
TWAP Range Comparisons
Beta endpoint returning every closed crypto up/down market in a bounded range with target price, old snapshot-style close price, Chainlink TWAP resolution reference, directions, differences, and disagreement summary. The default maximum range is 3 days.
GET
/
api
/
v1
/
twap
/
range
Range target vs TWAP comparisons
curl --request GET \
--url https://api.vatic.trading/api/v1/twap/rangeimport requests
url = "https://api.vatic.trading/api/v1/twap/range"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vatic.trading/api/v1/twap/range', 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://api.vatic.trading/api/v1/twap/range",
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://api.vatic.trading/api/v1/twap/range"
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://api.vatic.trading/api/v1/twap/range")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vatic.trading/api/v1/twap/range")
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{
"asset": "btc",
"marketType": "5min",
"twapWindowSeconds": 30,
"startIso": "2026-07-28T16:00:00.000Z",
"endIso": "2026-07-31T16:00:00.000Z",
"expectedMarkets": 864,
"summary": {
"ok": 864,
"failed": 0,
"disagreements": 12,
"disagreementRate": 0.013888888888888888
}
}Returns target price, snapshot close, Chainlink TWAP close, direction comparison, and TWAP-vs-snapshot difference for every closed market in a bounded range.
The default maximum range is 3 days. That covers:
Use explicit
Or use
For summary-only responses:
| Market type | 3-day market count |
|---|---|
5min | 864 |
15min | 288 |
4hour | 18 |
start and end:
curl "https://api.vatic.trading/api/v1/twap/range?asset=btc&type=5min&start=2026-07-28T16:00:00Z&end=2026-07-31T16:00:00Z"
days with an end timestamp:
curl "https://api.vatic.trading/api/v1/twap/range?asset=btc&type=5min&days=3&end=2026-07-31T16:00:00Z"
curl "https://api.vatic.trading/api/v1/twap/range?asset=btc&type=5min&days=3&end=2026-07-31T16:00:00Z&includeRows=false"
Query Parameters
Available options:
btc, eth, sol, xrp, hype, doge, bnb Available options:
5min, 15min, 4hour Range start. Accepts Unix seconds, Unix milliseconds, or ISO date string. Required unless days is supplied.
Example:
"2026-07-28T16:00:00Z"
Range end. Accepts Unix seconds, Unix milliseconds, or ISO date string. Defaults to now when days is supplied.
Example:
"2026-07-31T16:00:00Z"
Range length in days ending at end, endTimestamp, asOf, or now. Maximum is 3 by default.
Required range:
x <= 3Example:
3
Set to false for summary-only responses.
Response
Range comparisons
Was this page helpful?