Python (SDK)
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.aave_v3.aave_historical_transactions(chain=models.V1AaveHistoricalTransactionsChain.BASE, user_address="0x3254f3b1918637ba924e3F18968Cb74219974b63", offset=0, limit=100)
# Handle response
print(res)import { CompassApiSDK } from "@compass-labs/api-sdk";
const compassApiSDK = new CompassApiSDK({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await compassApiSDK.aaveV3.aaveHistoricalTransactions({
offset: 0,
limit: 100,
chain: "base",
userAddress: "0x3254f3b1918637ba924e3F18968Cb74219974b63",
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v1/aave/historical_transactions \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v1/aave/historical_transactions', 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.compasslabs.ai/v1/aave/historical_transactions",
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.compasslabs.ai/v1/aave/historical_transactions"
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.compasslabs.ai/v1/aave/historical_transactions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v1/aave/historical_transactions")
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{
"offset": 123,
"limit": 123,
"transactions": [
{
"id": "<string>",
"timestamp": 123,
"txHash": "<string>",
"amount": 1,
"borrowRateMode": 1,
"reserve": {
"symbol": "<string>",
"name": "<string>",
"underlyingAsset": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"decimals": 123
},
"assetPriceUSD": 1,
"action": "Borrow",
"block": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Aave V3
Historical Transactions
This endpoint retrieves historical transactions for a user on the AAVE platform.
It returns a list of transactions including deposits, withdrawals, borrows, and repayments. Each transaction includes details such as the token, amount, timestamp, and transaction type. This provides a comprehensive view of the user’s historical activity within the AAVE protocol.
⚠️ Data comes from the official Aave subgraph ( https://github.com/aave/protocol-subgraphs) and thus this particular endpoint may be less reliable than our other endpoints. ⚠️
GET
/
v1
/
aave
/
historical_transactions
Python (SDK)
from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.aave_v3.aave_historical_transactions(chain=models.V1AaveHistoricalTransactionsChain.BASE, user_address="0x3254f3b1918637ba924e3F18968Cb74219974b63", offset=0, limit=100)
# Handle response
print(res)import { CompassApiSDK } from "@compass-labs/api-sdk";
const compassApiSDK = new CompassApiSDK({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await compassApiSDK.aaveV3.aaveHistoricalTransactions({
offset: 0,
limit: 100,
chain: "base",
userAddress: "0x3254f3b1918637ba924e3F18968Cb74219974b63",
});
console.log(result);
}
run();curl --request GET \
--url https://api.compasslabs.ai/v1/aave/historical_transactions \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.compasslabs.ai/v1/aave/historical_transactions', 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.compasslabs.ai/v1/aave/historical_transactions",
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.compasslabs.ai/v1/aave/historical_transactions"
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.compasslabs.ai/v1/aave/historical_transactions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compasslabs.ai/v1/aave/historical_transactions")
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{
"offset": 123,
"limit": 123,
"transactions": [
{
"id": "<string>",
"timestamp": 123,
"txHash": "<string>",
"amount": 1,
"borrowRateMode": 1,
"reserve": {
"symbol": "<string>",
"name": "<string>",
"underlyingAsset": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"decimals": 123
},
"assetPriceUSD": 1,
"action": "Borrow",
"block": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Your Compass API Key. Get your key here.
Query Parameters
Response
Successful Response
Response model for getting Aave historical transactions.
Was this page helpful?