curl --request GET \
--url https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-distribution \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-distribution"
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-distribution', 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-distribution",
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-distribution"
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-distribution")
.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-distribution")
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": [
{
"callsContractsBought": 57457.100000000115,
"putContractsBought": 40470.70000000006,
"callsContractsSold": 57535.10000000011,
"putContractsSold": 35622.60000000012,
"callsPremiumBought": 106471710.98494382,
"putPremiumBought": 45180478.74917743,
"callsPremiumSold": 104654076.88302676,
"putPremiumSold": 44623690.99527128,
"callsContractsBoughtExchangeDirection": 55601.00000000013,
"putContractsBoughtExchangeDirection": 39594.80000000007,
"callsContractsSoldExchangeDirection": 59251.20000000009,
"putContractsSoldExchangeDirection": 36498.5000000001,
"callsPremiumBoughtExchangeDirection": 93552496.91739166,
"putPremiumBoughtExchangeDirection": 48017408.59515418,
"callsPremiumSoldExchangeDirection": 116283502.4950176,
"putPremiumSoldExchangeDirection": 41786761.14929454
}
],
"metadata": {
"api-version": "2023-09-30"
}
}
}{}Put Call Trades Distribution
Using proprietary algorithm (Amberdata direction) that assess real initiator of a trade, we sum by the amounts of contracts and premium of the last 24 hours (default) according to put/call/bought/sold metrics.
curl --request GET \
--url https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-distribution \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/derivatives/analytics/trades-flow/put-call-distribution"
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-distribution', 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-distribution",
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-distribution"
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-distribution")
.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-distribution")
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": [
{
"callsContractsBought": 57457.100000000115,
"putContractsBought": 40470.70000000006,
"callsContractsSold": 57535.10000000011,
"putContractsSold": 35622.60000000012,
"callsPremiumBought": 106471710.98494382,
"putPremiumBought": 45180478.74917743,
"callsPremiumSold": 104654076.88302676,
"putPremiumSold": 44623690.99527128,
"callsContractsBoughtExchangeDirection": 55601.00000000013,
"putContractsBoughtExchangeDirection": 39594.80000000007,
"callsContractsSoldExchangeDirection": 59251.20000000009,
"putContractsSoldExchangeDirection": 36498.5000000001,
"callsPremiumBoughtExchangeDirection": 93552496.91739166,
"putPremiumBoughtExchangeDirection": 48017408.59515418,
"callsPremiumSoldExchangeDirection": 116283502.4950176,
"putPremiumSoldExchangeDirection": 41786761.14929454
}
],
"metadata": {
"api-version": "2023-09-30"
}
}
}{}Authorizations
Query Parameters
[Required] 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] The option instrument subset with a given strike price. [Examples] 100000 | 3500
[Optional] The option instrument subset with a given expiration date.
[Optional] This flag enables users to filter for only blockTrade or non-blockTrades. If the user wants everything returned they can choose to leave the parameter blank.
[Optional] Time format of the timestamps in the return payload. [Defaults] milliseconds | ms* | iso | iso8601 | hr | human_readable
Was this page helpful?