Get daily trading volumes
curl --request GET \
--url https://api.international.coinbase.com/api/v1/instruments/volumes/dailyimport requests
url = "https://api.international.coinbase.com/api/v1/instruments/volumes/daily"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.international.coinbase.com/api/v1/instruments/volumes/daily', 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.international.coinbase.com/api/v1/instruments/volumes/daily",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.international.coinbase.com/api/v1/instruments/volumes/daily"
req, _ := http.NewRequest("GET", url, nil)
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.international.coinbase.com/api/v1/instruments/volumes/daily")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.international.coinbase.com/api/v1/instruments/volumes/daily")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"pagination": {
"result_limit": 30,
"result_offset": 50
},
"results": [
{
"timestamp": "2024-04-23T00:00:00Z",
"instruments": [
{
"symbol": "BTC-PERP",
"volume": "2180.5428999997785",
"notional": "145087054.13650635"
}
],
"totals": {
"total_instruments_volume": "255682824.87039998",
"total_instruments_notional": "2180.5428999997785",
"total_exchange_volume": "255682824.87039998",
"total_exchange_notional": "2180.5428999997785"
}
}
]
}Instruments
Get daily trading volumes
Retrieves the trading volumes for each instrument separated by day.
GET
/
api
/
v1
/
instruments
/
volumes
/
daily
Get daily trading volumes
curl --request GET \
--url https://api.international.coinbase.com/api/v1/instruments/volumes/dailyimport requests
url = "https://api.international.coinbase.com/api/v1/instruments/volumes/daily"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.international.coinbase.com/api/v1/instruments/volumes/daily', 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.international.coinbase.com/api/v1/instruments/volumes/daily",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.international.coinbase.com/api/v1/instruments/volumes/daily"
req, _ := http.NewRequest("GET", url, nil)
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.international.coinbase.com/api/v1/instruments/volumes/daily")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.international.coinbase.com/api/v1/instruments/volumes/daily")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"pagination": {
"result_limit": 30,
"result_offset": 50
},
"results": [
{
"timestamp": "2024-04-23T00:00:00Z",
"instruments": [
{
"symbol": "BTC-PERP",
"volume": "2180.5428999997785",
"notional": "145087054.13650635"
}
],
"totals": {
"total_instruments_volume": "255682824.87039998",
"total_instruments_notional": "2180.5428999997785",
"total_exchange_volume": "255682824.87039998",
"total_exchange_notional": "2180.5428999997785"
}
}
]
}- Java
- .NET
- Python
- TS/JS
InstrumentsService instrumentsService = IntxServiceFactory.createInstrumentsService(client);
GetDailyTradingVolumesRequest request = new GetDailyTradingVolumesRequest.Builder()
.instruments("BTC-PERP")
.build();
GetDailyTradingVolumesResponse response = instrumentsService.getDailyTradingVolumes(request);
var instrumentsService = new InstrumentsService(client);
var request = new GetDailyTradingVolumesRequest(
instruments: "BTC-PERP"
);
var response = instrumentsService.GetDailyTradingVolumes(request);
client = IntxClient()
request = GetDailyTradingVolumesRequest(
instruments="BTC-PERP"
)
response = client.get_instrument_volumes_daily(request)
const instrumentsService = new InstrumentsService(client);
instrumentsService.getDailyTradingVolume({
instrument: 'BTC-PERP',
}).then(async (response) => {
console.log('Daily Trading Volume: ', response);
})
Query Parameters
Identifies the instruments by name in a comma separated list (e.g., BTC-PERP,ETH-PERP)
The number of results to return (defaults to 60 with a max supported value of 100)
Example:
30
The number of results from the beginning to skip past
Example:
5
The first date to include data from in ISO 8601 timestamp format (e.g. 2024-03-01T00:00:00Z)
Return an OTHER bucket in the instrument list containing the volume of all instruments filtered out by the instruments query parameter
Was this page helpful?
⌘I