Get Volume Analytics
GET https://api.sfox.com/v1/analytics/volume
Retrieve historical exchange volume analytics by currency.
Responses are limited to 500 results. If the requested start_time , end_time , and interval will result in more than 500 results, your request will be rejected. To retrieve data over a larger time range, you will need to make multiple requests with new start_time / end_time ranges. Results may precede your specified start_time value.
Query Parameters
start_time required
timestamp
Unix timestamp (ms) of the first datapoint to return
end_time
timestamp
Unix timestamp (ms) of the last datapoint to return
interval required
int
Duration of each datapoint in seconds (i.e. interval = 86400 = daily volume data)
(60 | 3600 | 86400)
currency required
string
The currency to retrieve data for (i.e. eth)
net
boolean
Retrieve "net volume" (net buy/sell volume) or "gross volume" (total traded volume)
(true | false)
default = false
by_exchange
boolean
Retrieve total market volume or volume by exchange
(true | false)
default = false
Response Body
timstamp
The Unix timestamp (ms) of the beginning of the interval
exchange
The exchange associated with the volume data (only returned if by_exchange = true in the request)
volume
The quantity of the specified currency traded during this interval
usd_notional
The USD value of the quantity of the specified currency traded during this interval
Responses
Example Request
curl -H 'Authorization: Bearer <API_TOKEN>'
'https://api.sfox.com/v1/analytics/volume?currency=btc&interval=86400&start_time=1689279127000&end_time=1689624727000&net=true'const axios = require('axios');
axios({
method: 'get',
url: 'https://api.sfox.com/v1/analytics/volume?currency=btc&interval=86400&start_time=1689279127000&end_time=1689624727000&net=true',
headers: {
'Authorization': 'Bearer <API_KEY>'
}
}).then(response => {
console.log(response)
}).catch(err => {
console.error(err)
});import requests
data = requests.get(
"https://api.sfox.com/v1/analytics/volume?currency=btc&interval=86400&start_time=1689279127000&end_time=1689624727000&net=true",
headers={
"Authorization": "Bearer <API_KEY>",
}
)
print(data)Last updated