Get Collateral Aggregation
curl --request GET \
--url https://testnet.derivadex.io/stats/api/v1/aggregations/collateralimport requests
url = "https://testnet.derivadex.io/stats/api/v1/aggregations/collateral"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.derivadex.io/stats/api/v1/aggregations/collateral', 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://testnet.derivadex.io/stats/api/v1/aggregations/collateral",
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://testnet.derivadex.io/stats/api/v1/aggregations/collateral"
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://testnet.derivadex.io/stats/api/v1/aggregations/collateral")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.derivadex.io/stats/api/v1/aggregations/collateral")
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{
"nextStartingValue": "34000",
"value": [
{
"timestamp": 1673222400,
"collateral_deposits": "765000000",
"collateral_withdrawals": "-4125604.939779",
"collateral_fees": "-122277.669972",
"collateral_liquidations": "-339878.8954",
"collateral_overall": "760412238.494849"
}
],
"success": true,
"timestamp": 1673031089
}{
"success": false,
"errorMsg": "<string>"
}{
"success": false,
"errorMsg": "<string>"
}System
Get Collateral Aggregation
Returns a rolling sum of collateral per time period grouped by the inflow and outflow types.
GET
/
stats
/
api
/
v1
/
aggregations
/
collateral
Get Collateral Aggregation
curl --request GET \
--url https://testnet.derivadex.io/stats/api/v1/aggregations/collateralimport requests
url = "https://testnet.derivadex.io/stats/api/v1/aggregations/collateral"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.derivadex.io/stats/api/v1/aggregations/collateral', 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://testnet.derivadex.io/stats/api/v1/aggregations/collateral",
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://testnet.derivadex.io/stats/api/v1/aggregations/collateral"
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://testnet.derivadex.io/stats/api/v1/aggregations/collateral")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.derivadex.io/stats/api/v1/aggregations/collateral")
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{
"nextStartingValue": "34000",
"value": [
{
"timestamp": 1673222400,
"collateral_deposits": "765000000",
"collateral_withdrawals": "-4125604.939779",
"collateral_fees": "-122277.669972",
"collateral_liquidations": "-339878.8954",
"collateral_overall": "760412238.494849"
}
],
"success": true,
"timestamp": 1673031089
}{
"success": false,
"errorMsg": "<string>"
}{
"success": false,
"errorMsg": "<string>"
}Query Parameters
The period for the aggregation.
Available options:
week, day, hour, minute The partial total of this aggregation, used for rolling aggregation paging.
The from epoch
The to epoch
Response
Collateral aggregation data
Successful response for the Collateral aggregation API
The partial total for this aggregation, which can be passed as startingValue to get the next page for rolling aggregation type APIs.
Examples:
"34000"
null
The value of the response
Show child attributes
Show child attributes
Whether the request was successful
The timestamp of the response
Example:
1673031089
Last modified on June 23, 2026