Get lending timeseries metric
curl --request GET \
--url https://api.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity} \
--header 'X-Messari-API-Key: <api-key>'import requests
url = "https://api.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}"
headers = {"X-Messari-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Messari-API-Key': '<api-key>'}};
fetch('https://api.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}', 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.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}",
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-Messari-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.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Messari-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.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}")
.header("X-Messari-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Messari-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": null,
"data": {
"points": [
[
1748736000,
40874983380.06086,
8894,
1803840.5151728864,
1534847.1850615353,
44883.088839995566,
44883.088839995566,
40874983380.06086,
249689038.25288272,
16294149438.99072,
40268112671.70835,
1551387.8397111993,
197169.2727570456,
1.659838222757722,
207.1847393765548,
0,
197378.11733464492
],
[
1748822400,
41493958468.891754,
8801,
1503209.007828896,
1268459.8070935463,
79172.7962739207,
79172.7962739207,
41493958468.891754,
254306555.87463263,
16585912225.029522,
40359824834.80636,
1564840.776773972,
197873.75184447048,
2.803879577740232,
4.890537270539834,
0,
197881.44626131878
],
[
1748908800,
41587470329.87014,
9871,
1524454.7886562573,
1289423.8766373068,
56124.78365219167,
56124.78365219167,
41587470329.87014,
260633515.67957324,
16610197883.470901,
41412415086.66816,
1615121.062392914,
203794.93624297614,
2.3204786882224924,
98.13338385263712,
0,
203895.390105517
],
[
1748995200,
41911763138.436165,
10204,
1527950.2199558418,
1297908.365999997,
264418.62121689686,
264418.62121689686,
41911763138.436165,
260062527.579585,
16791416443.23892,
41684712563.38549,
1634185.9692337422,
206257.13995398706,
1.1849291085353382,
5.303010913648924,
0,
206263.62789400926
],
[
1749081600,
39703840117.461975,
12350,
2486100.501865924,
2155761.9465042767,
1243578.0972587697,
1243578.0972587697,
39703840117.461975,
244922570.7348961,
15931300843.386644,
40829202853.07708,
2065674.2563347481,
248763.88301270083,
9.367159731646316,
10989.644258556362,
0,
259762.89443098885
]
]
},
"metadata": {
"pointSchemas": [
{
"name": "Timestamp",
"slug": "time",
"description": "Timestamp of the data point.",
"is_timestamp": true
},
{
"name": "TVL 24 Hour USD",
"slug": "tvl24HourUsd",
"description": "Total Value Locked in USD.",
"is_timestamp": false
},
{
"name": "Active Addresses 24 Hour",
"slug": "activeAddresses24Hour",
"description": "Number of unique addresses interacting with the protocol.",
"is_timestamp": false
},
{
"name": "Fees 24 Hour USD",
"slug": "fees24HourUsd",
"description": "Total fees generated by the protocol in USD.",
"is_timestamp": false
},
{
"name": "Fees Supply Side 24 Hour USD",
"slug": "feesSupplySide24HourUsd",
"description": "Fees paid to liquidity providers in USD.",
"is_timestamp": false
},
{
"name": "Token Incentives 24 Hour USD",
"slug": "tokenIncentives24HourUsd",
"description": "Value of token incentives distributed by the protocol.",
"is_timestamp": false
},
{
"name": "Expenses 24 Hour USD",
"slug": "expenses24HourUsd",
"description": "Total expenses incurred by the protocol in USD.",
"is_timestamp": false
},
{
"name": "Net Deposits 24 Hour USD",
"slug": "netDeposits24HourUsd",
"description": "Net value of deposits into the protocol in USD.",
"is_timestamp": false
},
{
"name": "Treasury USD",
"slug": "treasuryUsd",
"description": "Value of assets held in the protocol treasury in USD.",
"is_timestamp": false
},
{
"name": "Borrowed USD",
"slug": "borrowedUsd",
"description": "Total value of assets borrowed from the protocol in USD.",
"is_timestamp": false
},
{
"name": "Deposits USD",
"slug": "depositsUsd",
"description": "Value deposited with the lending protocol in USD. This is a balance, unlike Net Deposits USD, which is a daily flow. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Interest 24 Hour USD",
"slug": "interest24HourUsd",
"description": "Interest paid by borrowers in USD. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Net Interest Income 24 Hour USD",
"slug": "netInterestIncome24HourUsd",
"description": "Interest earned less the interest paid out to depositors, in USD. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Flash Loan Fees 24 Hour USD",
"slug": "flashLoanFees24HourUsd",
"description": "Fees earned on flash loans in USD. This is a fee, unlike Flash Loan Volume USD. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Liquidation Fees 24 Hour USD",
"slug": "liquidationFees24HourUsd",
"description": "Fees earned on liquidations in USD. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Royalties 24 Hour USD",
"slug": "royalties24HourUsd",
"description": "Royalties paid to the protocol in USD. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Revenue USD",
"slug": "revenueUsd",
"description": "Daily lending revenue in USD, net interest income plus flash loan, liquidation and royalty fees. Distinct from Revenue USD, which is total protocol revenue from a different source. Sourced from Blockworks Research.",
"is_timestamp": false
}
],
"granularity": "1d"
}
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}Lending
Get Lending Timeseries Metric
Returns a timeseries metric for a specific Lending Protocol. Protocol data represents an aggregation of all deployments across all chains.
GET
/
metrics
/
v2
/
protocols
/
{protocolIdentifier}
/
metrics
/
lending
/
time-series
/
{granularity}
Get lending timeseries metric
curl --request GET \
--url https://api.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity} \
--header 'X-Messari-API-Key: <api-key>'import requests
url = "https://api.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}"
headers = {"X-Messari-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Messari-API-Key': '<api-key>'}};
fetch('https://api.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}', 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.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}",
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-Messari-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.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Messari-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.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}")
.header("X-Messari-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.messari.io/metrics/v2/protocols/{protocolIdentifier}/metrics/lending/time-series/{granularity}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Messari-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": null,
"data": {
"points": [
[
1748736000,
40874983380.06086,
8894,
1803840.5151728864,
1534847.1850615353,
44883.088839995566,
44883.088839995566,
40874983380.06086,
249689038.25288272,
16294149438.99072,
40268112671.70835,
1551387.8397111993,
197169.2727570456,
1.659838222757722,
207.1847393765548,
0,
197378.11733464492
],
[
1748822400,
41493958468.891754,
8801,
1503209.007828896,
1268459.8070935463,
79172.7962739207,
79172.7962739207,
41493958468.891754,
254306555.87463263,
16585912225.029522,
40359824834.80636,
1564840.776773972,
197873.75184447048,
2.803879577740232,
4.890537270539834,
0,
197881.44626131878
],
[
1748908800,
41587470329.87014,
9871,
1524454.7886562573,
1289423.8766373068,
56124.78365219167,
56124.78365219167,
41587470329.87014,
260633515.67957324,
16610197883.470901,
41412415086.66816,
1615121.062392914,
203794.93624297614,
2.3204786882224924,
98.13338385263712,
0,
203895.390105517
],
[
1748995200,
41911763138.436165,
10204,
1527950.2199558418,
1297908.365999997,
264418.62121689686,
264418.62121689686,
41911763138.436165,
260062527.579585,
16791416443.23892,
41684712563.38549,
1634185.9692337422,
206257.13995398706,
1.1849291085353382,
5.303010913648924,
0,
206263.62789400926
],
[
1749081600,
39703840117.461975,
12350,
2486100.501865924,
2155761.9465042767,
1243578.0972587697,
1243578.0972587697,
39703840117.461975,
244922570.7348961,
15931300843.386644,
40829202853.07708,
2065674.2563347481,
248763.88301270083,
9.367159731646316,
10989.644258556362,
0,
259762.89443098885
]
]
},
"metadata": {
"pointSchemas": [
{
"name": "Timestamp",
"slug": "time",
"description": "Timestamp of the data point.",
"is_timestamp": true
},
{
"name": "TVL 24 Hour USD",
"slug": "tvl24HourUsd",
"description": "Total Value Locked in USD.",
"is_timestamp": false
},
{
"name": "Active Addresses 24 Hour",
"slug": "activeAddresses24Hour",
"description": "Number of unique addresses interacting with the protocol.",
"is_timestamp": false
},
{
"name": "Fees 24 Hour USD",
"slug": "fees24HourUsd",
"description": "Total fees generated by the protocol in USD.",
"is_timestamp": false
},
{
"name": "Fees Supply Side 24 Hour USD",
"slug": "feesSupplySide24HourUsd",
"description": "Fees paid to liquidity providers in USD.",
"is_timestamp": false
},
{
"name": "Token Incentives 24 Hour USD",
"slug": "tokenIncentives24HourUsd",
"description": "Value of token incentives distributed by the protocol.",
"is_timestamp": false
},
{
"name": "Expenses 24 Hour USD",
"slug": "expenses24HourUsd",
"description": "Total expenses incurred by the protocol in USD.",
"is_timestamp": false
},
{
"name": "Net Deposits 24 Hour USD",
"slug": "netDeposits24HourUsd",
"description": "Net value of deposits into the protocol in USD.",
"is_timestamp": false
},
{
"name": "Treasury USD",
"slug": "treasuryUsd",
"description": "Value of assets held in the protocol treasury in USD.",
"is_timestamp": false
},
{
"name": "Borrowed USD",
"slug": "borrowedUsd",
"description": "Total value of assets borrowed from the protocol in USD.",
"is_timestamp": false
},
{
"name": "Deposits USD",
"slug": "depositsUsd",
"description": "Value deposited with the lending protocol in USD. This is a balance, unlike Net Deposits USD, which is a daily flow. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Interest 24 Hour USD",
"slug": "interest24HourUsd",
"description": "Interest paid by borrowers in USD. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Net Interest Income 24 Hour USD",
"slug": "netInterestIncome24HourUsd",
"description": "Interest earned less the interest paid out to depositors, in USD. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Flash Loan Fees 24 Hour USD",
"slug": "flashLoanFees24HourUsd",
"description": "Fees earned on flash loans in USD. This is a fee, unlike Flash Loan Volume USD. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Liquidation Fees 24 Hour USD",
"slug": "liquidationFees24HourUsd",
"description": "Fees earned on liquidations in USD. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Royalties 24 Hour USD",
"slug": "royalties24HourUsd",
"description": "Royalties paid to the protocol in USD. Sourced from Blockworks.",
"is_timestamp": false
},
{
"name": "Revenue USD",
"slug": "revenueUsd",
"description": "Daily lending revenue in USD, net interest income plus flash loan, liquidation and royalty fees. Distinct from Revenue USD, which is total protocol revenue from a different source. Sourced from Blockworks Research.",
"is_timestamp": false
}
],
"granularity": "1d"
}
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}Authorizations
Path Parameters
Protocol identifier (ID or slug)
Example:
"aave"
Granularity
Available options:
1d Example:
"1d"
Query Parameters
Time range start
Example:
"2025-06-01T00:00:00Z"
Time range end
Example:
"2025-06-07T00:00:00Z"
⌘I

