Decorated Trades
curl --request GET \
--url https://api.amberdata.com/markets/derivatives/analytics/trades-flow/decorated-trades \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/derivatives/analytics/trades-flow/decorated-trades"
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/decorated-trades', 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/decorated-trades",
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/decorated-trades"
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/decorated-trades")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/derivatives/analytics/trades-flow/decorated-trades")
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": [
{
"exchange": "deribit",
"preTradeOrderbookTimestamp": 1716161307196,
"exchangeTimestamp": 1716161308175,
"postTradeOrderbookTimestamp": 1716161308179,
"tradeId": "302085048",
"instrument": "BTC-24MAY24-68000-C",
"instrumentNormalized": "DERIBIT-BTC-24MAY24-68000.0-C",
"currency": "BTC",
"expirationTimestamp": 1716537600000,
"strike": 68000,
"putCall": "C",
"blockTradeId": null,
"numberOfLegs": 0,
"liquidation": null,
"tickDirection": "Minus Tick",
"tradeAmount": 0.3,
"tradeIv": 49.55,
"price": 0.0115,
"priceUsd": 762.697135,
"indexPrice": 66242.94,
"underlyingPrice": 66321.49,
"volume24h": 46,
"priceHigh24h": 0.02,
"priceLow24h": 0.012,
"preTradeBidVolume": 21.1,
"preTradeBidIv": 48.29,
"preTradeBidPrice": 0.011,
"preTradeMidIv": 48.92,
"preTradeMidPrice": 0.01125,
"preTradeMarkIv": 49.2,
"preTradeMarkPrice": 0.0114,
"preTradeAskVolume": 0.3,
"preTradeAskIv": 49.55,
"preTradeAskPrice": 0.0115,
"postTradeBidVolume": 0.7,
"postTradeBidIv": 49.55,
"postTradeBidPrice": 0.0115,
"postTradeMidIv": 50.18,
"postTradeMidPrice": 0.01175,
"postTradeMarkIv": 49.2,
"postTradeMarkPrice": 0.0114,
"postTradeAskVolume": 63.7,
"postTradeAskIv": 50.81,
"postTradeAskPrice": 0.012,
"delta": 0.33062,
"gamma": 0.0001,
"theta": -148.29166,
"vega": 26.257,
"rho": 2.52671,
"preTradeOpenInterest": 541.1,
"postTradeOpenInterest": 541.1,
"openInterestChange": 0
}
]
}
}{}Trades / Flow
Decorated Trades
This endpoint returns option “times and sales” data that’s decorated with pre-trade level-1 orderbook data and post-trade level-1 data. This is the core dataset of the Amberdata direction and GEX “Gamma Exposure” analysis. We use this orderbook impact to analyze the true aggressor of every trade, while assuming that market-makers (aka “dealers”) are typically the passive trade participants. Some exchanges, such as “okex” and “bybit” will have volatility values in decimal format (ex: 97% iv will be noted as 0.97)
GET
/
analytics
/
trades-flow
/
decorated-trades
Decorated Trades
curl --request GET \
--url https://api.amberdata.com/markets/derivatives/analytics/trades-flow/decorated-trades \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/derivatives/analytics/trades-flow/decorated-trades"
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/decorated-trades', 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/decorated-trades",
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/decorated-trades"
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/decorated-trades")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/derivatives/analytics/trades-flow/decorated-trades")
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": [
{
"exchange": "deribit",
"preTradeOrderbookTimestamp": 1716161307196,
"exchangeTimestamp": 1716161308175,
"postTradeOrderbookTimestamp": 1716161308179,
"tradeId": "302085048",
"instrument": "BTC-24MAY24-68000-C",
"instrumentNormalized": "DERIBIT-BTC-24MAY24-68000.0-C",
"currency": "BTC",
"expirationTimestamp": 1716537600000,
"strike": 68000,
"putCall": "C",
"blockTradeId": null,
"numberOfLegs": 0,
"liquidation": null,
"tickDirection": "Minus Tick",
"tradeAmount": 0.3,
"tradeIv": 49.55,
"price": 0.0115,
"priceUsd": 762.697135,
"indexPrice": 66242.94,
"underlyingPrice": 66321.49,
"volume24h": 46,
"priceHigh24h": 0.02,
"priceLow24h": 0.012,
"preTradeBidVolume": 21.1,
"preTradeBidIv": 48.29,
"preTradeBidPrice": 0.011,
"preTradeMidIv": 48.92,
"preTradeMidPrice": 0.01125,
"preTradeMarkIv": 49.2,
"preTradeMarkPrice": 0.0114,
"preTradeAskVolume": 0.3,
"preTradeAskIv": 49.55,
"preTradeAskPrice": 0.0115,
"postTradeBidVolume": 0.7,
"postTradeBidIv": 49.55,
"postTradeBidPrice": 0.0115,
"postTradeMidIv": 50.18,
"postTradeMidPrice": 0.01175,
"postTradeMarkIv": 49.2,
"postTradeMarkPrice": 0.0114,
"postTradeAskVolume": 63.7,
"postTradeAskIv": 50.81,
"postTradeAskPrice": 0.012,
"delta": 0.33062,
"gamma": 0.0001,
"theta": -148.29166,
"vega": 26.257,
"rho": 2.52671,
"preTradeOpenInterest": 541.1,
"postTradeOpenInterest": 541.1,
"openInterestChange": 0
}
]
}
}{}Query Parameters
Was this page helpful?