List lending metrics
curl --request GET \
--url https://api.messari.io/metrics/v2/protocols/lending/metrics \
--header 'X-Messari-API-Key: <api-key>'import requests
url = "https://api.messari.io/metrics/v2/protocols/lending/metrics"
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/lending/metrics', 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/lending/metrics",
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/lending/metrics"
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/lending/metrics")
.header("X-Messari-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.messari.io/metrics/v2/protocols/lending/metrics")
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": {
"datasets": [
{
"slug": "lending",
"granularities": [
"1d",
"1w"
],
"metrics": [
{
"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
}
]
},
{
"slug": "lending-instances",
"granularities": [
"1d"
],
"metrics": [
{
"name": "Timestamp",
"slug": "time",
"description": "Timestamp of the data point.",
"is_timestamp": true
},
{
"name": "Deposits (USD)",
"slug": "depositsUsd",
"description": "Total deposits (supply and collateral) in USD across the product's markets. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Borrowed (USD)",
"slug": "borrowedUsd",
"description": "Total outstanding borrows in USD across the product's markets. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "TVL (USD)",
"slug": "tvl24HourUsd",
"description": "TVL in USD, deposits minus borrows. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Interest (USD)",
"slug": "interest24HourUsd",
"description": "Daily interest paid by borrowers in USD. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Net Interest Income (USD)",
"slug": "netInterestIncome24HourUsd",
"description": "Daily net interest income in USD, the interest kept by the protocol. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Flash Loan Fees (USD)",
"slug": "flashLoanFees24HourUsd",
"description": "Daily flash loan fees in USD. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Liquidation Fees (USD)",
"slug": "liquidationFees24HourUsd",
"description": "Daily liquidation fees in USD. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Royalties (USD)",
"slug": "royalties24HourUsd",
"description": "Daily royalty fees in USD. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Fees (USD)",
"slug": "fees24HourUsd",
"description": "Daily total fees in USD, interest plus flash loan, liquidation and royalty fees. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Revenue (USD)",
"slug": "revenueUsd",
"description": "Daily revenue in USD, net interest income plus flash loan, liquidation and royalty fees. Sourced from Blockworks Research.",
"is_timestamp": false
}
]
},
{
"slug": "lending-markets",
"granularities": [
"1d"
],
"metrics": [
{
"name": "Timestamp",
"slug": "time",
"description": "Timestamp of the data point.",
"is_timestamp": true
},
{
"name": "Deposits (USD)",
"slug": "depositsUsd",
"description": "Total deposits (supply and collateral) in USD across the market's tokens. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Borrowed (USD)",
"slug": "borrowedUsd",
"description": "Total outstanding borrows in USD across the market's tokens. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "TVL (USD)",
"slug": "tvl24HourUsd",
"description": "TVL in USD, deposits minus borrows. Sourced from Blockworks Research.",
"is_timestamp": false
}
]
}
]
}
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}Lending
List Lending Metrics
Returns a list of timeseries metrics available for lending protocols
GET
/
metrics
/
v2
/
protocols
/
lending
/
metrics
List lending metrics
curl --request GET \
--url https://api.messari.io/metrics/v2/protocols/lending/metrics \
--header 'X-Messari-API-Key: <api-key>'import requests
url = "https://api.messari.io/metrics/v2/protocols/lending/metrics"
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/lending/metrics', 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/lending/metrics",
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/lending/metrics"
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/lending/metrics")
.header("X-Messari-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.messari.io/metrics/v2/protocols/lending/metrics")
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": {
"datasets": [
{
"slug": "lending",
"granularities": [
"1d",
"1w"
],
"metrics": [
{
"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
}
]
},
{
"slug": "lending-instances",
"granularities": [
"1d"
],
"metrics": [
{
"name": "Timestamp",
"slug": "time",
"description": "Timestamp of the data point.",
"is_timestamp": true
},
{
"name": "Deposits (USD)",
"slug": "depositsUsd",
"description": "Total deposits (supply and collateral) in USD across the product's markets. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Borrowed (USD)",
"slug": "borrowedUsd",
"description": "Total outstanding borrows in USD across the product's markets. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "TVL (USD)",
"slug": "tvl24HourUsd",
"description": "TVL in USD, deposits minus borrows. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Interest (USD)",
"slug": "interest24HourUsd",
"description": "Daily interest paid by borrowers in USD. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Net Interest Income (USD)",
"slug": "netInterestIncome24HourUsd",
"description": "Daily net interest income in USD, the interest kept by the protocol. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Flash Loan Fees (USD)",
"slug": "flashLoanFees24HourUsd",
"description": "Daily flash loan fees in USD. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Liquidation Fees (USD)",
"slug": "liquidationFees24HourUsd",
"description": "Daily liquidation fees in USD. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Royalties (USD)",
"slug": "royalties24HourUsd",
"description": "Daily royalty fees in USD. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Fees (USD)",
"slug": "fees24HourUsd",
"description": "Daily total fees in USD, interest plus flash loan, liquidation and royalty fees. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Revenue (USD)",
"slug": "revenueUsd",
"description": "Daily revenue in USD, net interest income plus flash loan, liquidation and royalty fees. Sourced from Blockworks Research.",
"is_timestamp": false
}
]
},
{
"slug": "lending-markets",
"granularities": [
"1d"
],
"metrics": [
{
"name": "Timestamp",
"slug": "time",
"description": "Timestamp of the data point.",
"is_timestamp": true
},
{
"name": "Deposits (USD)",
"slug": "depositsUsd",
"description": "Total deposits (supply and collateral) in USD across the market's tokens. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "Borrowed (USD)",
"slug": "borrowedUsd",
"description": "Total outstanding borrows in USD across the market's tokens. Sourced from Blockworks Research.",
"is_timestamp": false
},
{
"name": "TVL (USD)",
"slug": "tvl24HourUsd",
"description": "TVL in USD, deposits minus borrows. Sourced from Blockworks Research.",
"is_timestamp": false
}
]
}
]
}
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}⌘I

