curl --request GET \
--url https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio', 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.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"data": [
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.57,
"putCallRatioVolume24hr": 0.57,
"timestamp": 1732233600000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.55,
"putCallRatioVolume24hr": 0.55,
"timestamp": 1732147200000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.55,
"putCallRatioVolume24hr": 0.55,
"timestamp": 1732060800000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.54,
"putCallRatioVolume24hr": 0.54,
"timestamp": 1731974400000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.53,
"putCallRatioVolume24hr": 0.53,
"timestamp": 1731888000000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.53,
"putCallRatioVolume24hr": 0.53,
"timestamp": 1731801600000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.53,
"putCallRatioVolume24hr": 0.53,
"timestamp": 1731715200000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.55,
"putCallRatioVolume24hr": 0.55,
"timestamp": 1731628800000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.55,
"putCallRatioVolume24hr": 0.55,
"timestamp": 1731542400000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.54,
"putCallRatioVolume24hr": 0.54,
"timestamp": 1731456000000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.52,
"putCallRatioVolume24hr": 0.52,
"timestamp": 1731369600000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.49,
"putCallRatioVolume24hr": 0.49,
"timestamp": 1731283200000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.49,
"putCallRatioVolume24hr": 0.49,
"timestamp": 1731196800000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.49,
"putCallRatioVolume24hr": 0.49,
"timestamp": 1731110400000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.51,
"putCallRatioVolume24hr": 0.51,
"timestamp": 1731024000000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.5,
"putCallRatioVolume24hr": 0.5,
"timestamp": 1730937600000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.5,
"putCallRatioVolume24hr": 0.5,
"timestamp": 1730851200000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.49,
"putCallRatioVolume24hr": 0.49,
"timestamp": 1730764800000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.48,
"putCallRatioVolume24hr": 0.48,
"timestamp": 1730678400000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.48,
"putCallRatioVolume24hr": 0.48,
"timestamp": 1730592000000
}
],
"metadata": {
"api-version": "2023-09-30"
}
}
}{}Put Call Ratio
This endpoint returns the Put Call Ratio for open interest and volume. The users can request the data in daily or hourly granularity.
curl --request GET \
--url https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio', 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.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-ratio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"data": [
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.57,
"putCallRatioVolume24hr": 0.57,
"timestamp": 1732233600000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.55,
"putCallRatioVolume24hr": 0.55,
"timestamp": 1732147200000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.55,
"putCallRatioVolume24hr": 0.55,
"timestamp": 1732060800000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.54,
"putCallRatioVolume24hr": 0.54,
"timestamp": 1731974400000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.53,
"putCallRatioVolume24hr": 0.53,
"timestamp": 1731888000000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.53,
"putCallRatioVolume24hr": 0.53,
"timestamp": 1731801600000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.53,
"putCallRatioVolume24hr": 0.53,
"timestamp": 1731715200000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.55,
"putCallRatioVolume24hr": 0.55,
"timestamp": 1731628800000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.55,
"putCallRatioVolume24hr": 0.55,
"timestamp": 1731542400000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.54,
"putCallRatioVolume24hr": 0.54,
"timestamp": 1731456000000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.52,
"putCallRatioVolume24hr": 0.52,
"timestamp": 1731369600000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.49,
"putCallRatioVolume24hr": 0.49,
"timestamp": 1731283200000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.49,
"putCallRatioVolume24hr": 0.49,
"timestamp": 1731196800000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.49,
"putCallRatioVolume24hr": 0.49,
"timestamp": 1731110400000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.51,
"putCallRatioVolume24hr": 0.51,
"timestamp": 1731024000000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.5,
"putCallRatioVolume24hr": 0.5,
"timestamp": 1730937600000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.5,
"putCallRatioVolume24hr": 0.5,
"timestamp": 1730851200000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.49,
"putCallRatioVolume24hr": 0.49,
"timestamp": 1730764800000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.48,
"putCallRatioVolume24hr": 0.48,
"timestamp": 1730678400000
},
{
"currency": "BTC",
"exchange": "deribit",
"putCallRatioOpenInterest": 0.48,
"putCallRatioVolume24hr": 0.48,
"timestamp": 1730592000000
}
],
"metadata": {
"api-version": "2023-09-30"
}
}
}{}Authorizations
Query Parameters
[Optional] The exchange for which to retrieve the listed option level 1 quotes. [Examples] deribit | okex | bybit
[Required] The underlying currency for which there are listed option instruments. [Examples] BTC | SOL_USDC Note: inverse options have underlying currencies formatted as (BTC, ETH) while linear option currency formats include the stable coin in the same (SOL_USDC)
[Optional] Payload only includes data after this date (inclusive). [Formats] seconds | milliseconds | iso8601 [Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00
[Required] Payload only includes data before this date (exclusive). [Formats] seconds | milliseconds | iso8601 [Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00
[Optional] This controls the granularity of the data. The user can input hour or day.
[Optional] Time format of the timestamps in the return payload. [Defaults] milliseconds | ms* | iso | iso8601 | hr | human_readable
Was this page helpful?