Get aggregation
curl --request GET \
--url https://api.privy.io/v1/aggregations/{aggregation_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'privy-app-id: <privy-app-id>'HttpResponse<String> response = Unirest.get("https://api.privy.io/v1/aggregations/{aggregation_id}")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {
method: 'GET',
headers: {'privy-app-id': '<privy-app-id>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.privy.io/v1/aggregations/{aggregation_id}', 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.privy.io/v1/aggregations/{aggregation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"privy-app-id: <privy-app-id>"
],
]);
$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.privy.io/v1/aggregations/{aggregation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"name": "<string>",
"method": "eth_signTransaction",
"metric": {
"field": "<string>",
"field_source": "<string>",
"function": "sum",
"abi": [
{
"type": "function",
"name": "<string>",
"inputs": [
{
"type": "<string>",
"name": "<string>",
"components": [
{}
],
"indexed": true,
"internalType": "<string>"
}
],
"outputs": [
{
"type": "<string>",
"name": "<string>",
"components": [
{}
],
"indexed": true,
"internalType": "<string>"
}
],
"stateMutability": "pure",
"anonymous": true
}
]
},
"window": {
"type": "rolling",
"seconds": 131400
},
"id": "<string>",
"created_at": 123,
"owner_id": "<string>",
"conditions": [],
"group_by": []
}Aggregations
Get aggregation
Get an aggregation by aggregation ID.
GET
/
v1
/
aggregations
/
{aggregation_id}
Get aggregation
curl --request GET \
--url https://api.privy.io/v1/aggregations/{aggregation_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'privy-app-id: <privy-app-id>'HttpResponse<String> response = Unirest.get("https://api.privy.io/v1/aggregations/{aggregation_id}")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {
method: 'GET',
headers: {'privy-app-id': '<privy-app-id>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.privy.io/v1/aggregations/{aggregation_id}', 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.privy.io/v1/aggregations/{aggregation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"privy-app-id: <privy-app-id>"
],
]);
$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.privy.io/v1/aggregations/{aggregation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"name": "<string>",
"method": "eth_signTransaction",
"metric": {
"field": "<string>",
"field_source": "<string>",
"function": "sum",
"abi": [
{
"type": "function",
"name": "<string>",
"inputs": [
{
"type": "<string>",
"name": "<string>",
"components": [
{}
],
"indexed": true,
"internalType": "<string>"
}
],
"outputs": [
{
"type": "<string>",
"name": "<string>",
"components": [
{}
],
"indexed": true,
"internalType": "<string>"
}
],
"stateMutability": "pure",
"anonymous": true
}
]
},
"window": {
"type": "rolling",
"seconds": 131400
},
"id": "<string>",
"created_at": 123,
"owner_id": "<string>",
"conditions": [],
"group_by": []
}Authorizations
Response
200 - application/json
Requested aggregation object.
An aggregation that measures and tracks metrics over a period of time.
conditions
(EthereumTransactionCondition · object | EthereumCalldataCondition · object | EthereumTypedDataDomainCondition · object | EthereumTypedDataMessageCondition · object | Ethereum7702AuthorizationCondition · object | TempoTransactionCondition · object | SolanaProgramInstructionCondition · object | SolanaInstructionDataCondition · object | SolanaSystemProgramInstructionCondition · object | SolanaTokenProgramInstructionCondition · object | SystemCondition · object | TronTransactionCondition · object | TronCalldataCondition · object | XrplTransactionCondition · object | SuiTransactionCommandCondition · object | SuiTransferObjectsCommandCondition · object | ActionRequestBodyCondition · object | AggregationCondition · object | MessageSigningCondition · object)[]
Optional conditions to filter events before aggregation.
Maximum array length:
100The verbatim Ethereum transaction object in an eth_signTransaction or eth_sendTransaction request.
- EthereumTransactionCondition
- EthereumCalldataCondition
- EthereumTypedDataDomainCondition
- EthereumTypedDataMessageCondition
- Ethereum7702AuthorizationCondition
- TempoTransactionCondition
- SolanaProgramInstructionCondition
- SolanaInstructionDataCondition
- SolanaSystemProgramInstructionCondition
- SolanaTokenProgramInstructionCondition
- SystemCondition
- TronTransactionCondition
- TronCalldataCondition
- XrplTransactionCondition
- SuiTransactionCommandCondition
- SuiTransferObjectsCommandCondition
- ActionRequestBodyCondition
- AggregationCondition
- MessageSigningCondition
Show child attributes
Show child attributes
Was this page helpful?

