Snapshots Historical
curl --request GET \
--url https://api.amberdata.com/markets/options/order-book-snapshots/{instrument} \
--compressed \
--header 'Accept-Encoding: <accept-encoding>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/options/order-book-snapshots/{instrument}"
headers = {
"Accept-Encoding": "<accept-encoding>",
"x-api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Accept-Encoding': '<accept-encoding>', 'x-api-key': '<api-key>'}
};
fetch('https://api.amberdata.com/markets/options/order-book-snapshots/{instrument}', 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/options/order-book-snapshots/{instrument}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept-Encoding: <accept-encoding>",
"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/options/order-book-snapshots/{instrument}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Encoding", "<accept-encoding>")
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/options/order-book-snapshots/{instrument}")
.header("Accept-Encoding", "<accept-encoding>")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/options/order-book-snapshots/{instrument}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept-Encoding"] = '<accept-encoding>'
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"metadata": {
"next": "https://api.amberdata.com/markets/options/order-book-snapshots/BTC-13FEB26-100000-C?cursor=N4IgpgHgxgFghgOwOZhALhAEzAJwJYBGeALiADQhQCuOAzgPY7oJUA2rFxeAtmLcXG4AHZmw4h%2BcHMQAicYqjQBGAOwA2AJwqAHAFY1AJgAMugCwqKYBJjkL0qzTv1mDaoxTwIorKtgCqCLRUQkKMCpgAotDwyHzoAGZwrLRgFNxwEAAyYABuYKyi7Jw8YABijOmkGNx47HgpUPTWtOQg8RXy6CAAVgwIrQzSANJgAJ5dDlp6hkazRgD62PhExPNKAMwqukqa2toGugbzAEIAKgDCALQbpRHHrtdzs5fnIAC%2BQA",
"api-version": "2023-09-30T00:00:00.000Z"
},
"data": [
{
"timestamp": 1769699280000,
"instrument": "BTC-13FEB26-100000-C",
"exchange": "deribit",
"exchangeTimestamp": 1769699279646,
"exchangeTimestampNanoseconds": 0,
"sequence": 137341145308,
"underlyingPrice": 86308.1667,
"underlyingIndex": "SYN.BTC-13FEB26",
"low": 0.0012,
"high": 0.0031,
"volume": 112.6,
"volumeUSD": 16365.05,
"priceChange": -58.6207,
"openInterest": 1392.8,
"minPrice": 0.0001,
"maxPrice": 0.016,
"markPrice": 0.0012,
"markIv": 40.59,
"lastPrice": 0.0012,
"interestRate": 0,
"indexPrice": 86149.28,
"estimatedDeliveryPrice": 0,
"rho": 1.30112,
"vega": 14.51698,
"delta": 0.03865,
"gamma": 0.00001,
"theta": -20.04074,
"bidIv": 40.42,
"askIv": 42.12,
"bestBidPrice": 0.0012,
"bestAskPrice": 0.0015,
"bestBidVolume": 3.7,
"bestAskVolume": 69.2,
"state": "open",
"ask": [
{
"price": 0.0295,
"volume": 69.2,
"numOrders": null
},
{
"price": 0.0295,
"volume": 69.2,
"numOrders": null
},
{
"price": 0.0295,
"volume": 69.2,
"numOrders": null
}
],
"bid": [
{
"price": 0.0012,
"volume": 3.7,
"numOrders": null
},
{
"price": 0.0011,
"volume": 16.9,
"numOrders": null
},
{
"price": 0.001,
"volume": 42,
"numOrders": null
}
]
}
]
}
}"{}"Order Books
Snapshots Historical
Provides detailed historical snapshots of options order books, including bid and ask levels, underlying prices, market statistics, open interest, and Greeks, enabling in-depth analysis of market depth and options pricing over time across supported exchanges.
GET
/
options
/
order-book-snapshots
/
{instrument}
Snapshots Historical
curl --request GET \
--url https://api.amberdata.com/markets/options/order-book-snapshots/{instrument} \
--compressed \
--header 'Accept-Encoding: <accept-encoding>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/options/order-book-snapshots/{instrument}"
headers = {
"Accept-Encoding": "<accept-encoding>",
"x-api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Accept-Encoding': '<accept-encoding>', 'x-api-key': '<api-key>'}
};
fetch('https://api.amberdata.com/markets/options/order-book-snapshots/{instrument}', 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/options/order-book-snapshots/{instrument}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept-Encoding: <accept-encoding>",
"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/options/order-book-snapshots/{instrument}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Encoding", "<accept-encoding>")
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/options/order-book-snapshots/{instrument}")
.header("Accept-Encoding", "<accept-encoding>")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/options/order-book-snapshots/{instrument}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept-Encoding"] = '<accept-encoding>'
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"metadata": {
"next": "https://api.amberdata.com/markets/options/order-book-snapshots/BTC-13FEB26-100000-C?cursor=N4IgpgHgxgFghgOwOZhALhAEzAJwJYBGeALiADQhQCuOAzgPY7oJUA2rFxeAtmLcXG4AHZmw4h%2BcHMQAicYqjQBGAOwA2AJwqAHAFY1AJgAMugCwqKYBJjkL0qzTv1mDaoxTwIorKtgCqCLRUQkKMCpgAotDwyHzoAGZwrLRgFNxwEAAyYABuYKyi7Jw8YABijOmkGNx47HgpUPTWtOQg8RXy6CAAVgwIrQzSANJgAJ5dDlp6hkazRgD62PhExPNKAMwqukqa2toGugbzAEIAKgDCALQbpRHHrtdzs5fnIAC%2BQA",
"api-version": "2023-09-30T00:00:00.000Z"
},
"data": [
{
"timestamp": 1769699280000,
"instrument": "BTC-13FEB26-100000-C",
"exchange": "deribit",
"exchangeTimestamp": 1769699279646,
"exchangeTimestampNanoseconds": 0,
"sequence": 137341145308,
"underlyingPrice": 86308.1667,
"underlyingIndex": "SYN.BTC-13FEB26",
"low": 0.0012,
"high": 0.0031,
"volume": 112.6,
"volumeUSD": 16365.05,
"priceChange": -58.6207,
"openInterest": 1392.8,
"minPrice": 0.0001,
"maxPrice": 0.016,
"markPrice": 0.0012,
"markIv": 40.59,
"lastPrice": 0.0012,
"interestRate": 0,
"indexPrice": 86149.28,
"estimatedDeliveryPrice": 0,
"rho": 1.30112,
"vega": 14.51698,
"delta": 0.03865,
"gamma": 0.00001,
"theta": -20.04074,
"bidIv": 40.42,
"askIv": 42.12,
"bestBidPrice": 0.0012,
"bestAskPrice": 0.0015,
"bestBidVolume": 3.7,
"bestAskVolume": 69.2,
"state": "open",
"ask": [
{
"price": 0.0295,
"volume": 69.2,
"numOrders": null
},
{
"price": 0.0295,
"volume": 69.2,
"numOrders": null
},
{
"price": 0.0295,
"volume": 69.2,
"numOrders": null
}
],
"bid": [
{
"price": 0.0012,
"volume": 3.7,
"numOrders": null
},
{
"price": 0.0011,
"volume": 16.9,
"numOrders": null
},
{
"price": 0.001,
"volume": 42,
"numOrders": null
}
]
}
]
}
}"{}"The maximum time range (difference between
startDate and endDate) is 1 hour.If the
startDate and endDate query parameters are not provided, the API will return the data from the previous 10 minutes.Path Parameters
Query Parameters
[Optional] Specifies the direction in which the data is sorted (by timestamp). [Defaults] asc (ascending order). [Usage Conditions] This parameter can only be used if the startDate and endDate timeframe is within the most recent 24 hours, or if the startDate and endDate parameters are not used at all. [Examples] ascending | descending | asc | desc
Was this page helpful?