curl --request GET \
--url https://api.amberdata.com/markets/spot/analytics/trade/frequency \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/spot/analytics/trade/frequency"
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/spot/analytics/trade/frequency', 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/spot/analytics/trade/frequency",
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/spot/analytics/trade/frequency"
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/spot/analytics/trade/frequency")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/spot/analytics/trade/frequency")
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": [
{
"avgTradeSizeUsd": 2430.788381711542,
"buyTradeCount": 248726,
"buyVolumeCoin": 4368.776665650001,
"close": 96495.11,
"exchange": "gdax",
"high": 97546.99,
"low": 94136.79,
"netBuyVolumeCoin": 403.52652067,
"open": 96165.11,
"orderSizeCategoryUsd": "All",
"pair": "btc_usd",
"sellTradeCount": 207596,
"sellVolumeCoin": 3965.2501449799993,
"timestamp": "2025-05-01 00:00:00 000",
"totalTradeCount": 456322,
"totalVolumeUsd": 801971245.3019549,
"vwap": 96235.22440469854
}
]
}
}Trade Frequency
This endpoint condenses raw trade data into 1-minute increments, making it easier to analyze aggregated statistics without parsing millions of individual trades. It includes a breakdown of trades by quote size, allowing users to filter by specific trade sizes or view all trades. Key metrics provided are total volume traded, VWAP (volume-weighted average price), trade count, and net buy/sell aggressor volumes.
curl --request GET \
--url https://api.amberdata.com/markets/spot/analytics/trade/frequency \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/spot/analytics/trade/frequency"
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/spot/analytics/trade/frequency', 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/spot/analytics/trade/frequency",
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/spot/analytics/trade/frequency"
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/spot/analytics/trade/frequency")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/spot/analytics/trade/frequency")
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": [
{
"avgTradeSizeUsd": 2430.788381711542,
"buyTradeCount": 248726,
"buyVolumeCoin": 4368.776665650001,
"close": 96495.11,
"exchange": "gdax",
"high": 97546.99,
"low": 94136.79,
"netBuyVolumeCoin": 403.52652067,
"open": 96165.11,
"orderSizeCategoryUsd": "All",
"pair": "btc_usd",
"sellTradeCount": 207596,
"sellVolumeCoin": 3965.2501449799993,
"timestamp": "2025-05-01 00:00:00 000",
"totalTradeCount": 456322,
"totalVolumeUsd": 801971245.3019549,
"vwap": 96235.22440469854
}
]
}
}Authorizations
Query Parameters
[Optional] The exchange for which to retrieve listed spot instruments.
[Examples] gdax | okex | binance | binanceus
[Required] The currency pair for the spot instrument.
[Examples] btc_usd | btc_usdc | eth_usd
[Required] This parameter allows users to return either a specific pair, such as btc_usd, when set to FALSE, or return every pair related to an underlying asset, such as BTC, when set to TRUE (ex: btc_eur, btc_usd, btc_usdt, etc)
[Optional] Users can specify to return all aggregated trades or only trades that fit a specific size threshold (0-1k, 1k-10k, 10k-100k, 100k+, ALL).
Users can specify by passing the lower threshold flag 0 | 1k | 10k | 100k | All
[Optional] Payload only includes data after this date (inclusive).
[Formats] seconds | milliseconds | iso8601
[Examples] 1578531600 | 1578531600000 | 2025-02-27
[Optional] Payload only includes data up to this date.
[Formats] seconds | milliseconds | iso8601
[Examples] 1578531600 | 1578531600000 | 2025-02-28
[Optional] Time format of the timestamps in the return payload.
[Defaults] milliseconds | ms* | iso | iso8601 | hr | human_readable
[Optional] Time interval of data frequency for the selected date range.
[Examples] minute | hour | day
Was this page helpful?