Get protocols metrics
Get protocols metrics
Supported on: Ethereum Base Solana BNB Chain Arbitrum Avalanche ZKsync Gnosis Optimism Polygon Linea Sonic Unichain
Parameters
addresses
* array queryWallet addresses
chain_id
any queryBlockchain chain identifier
timerange
any queryTime range for metrics calculation
protocol_group_id
any queryProtocol group identifier to filter by
contract_address
any queryContract address to filter by
token_id
any queryToken identifier to filter by
use_cache
boolean queryGet response from cache
Request Body
This request doesn’t have any request body.
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const axios = require('axios');
async function httpCall() {
const url =
'https://api.1inch.com/portfolio/portfolio/v5.0/protocols/metrics';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {};
try {
const response = await axios.get(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200
422
result
* array items
HistoryMetrics object Historical performance metrics for a position over a time range.
index
* any Position or aggregate identifier
anyOf[0]
string anyOf[1]
AggregatePositionIndex object Aggregate position identifier used for rolled-up metrics across positions.
address
any anyOf[0]
AddressType any anyOf[0]
string anyOf[1]
string anyOf[1]
null chain
any anyOf[0]
Chain any (Enum)Supported blockchain networks.
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
anyOf[1]
null contract_address
any anyOf[0]
AddressType any anyOf[0]
string anyOf[1]
string anyOf[1]
null token_id
integer protocol_sub_group_id
any anyOf[0]
string anyOf[1]
null profit_abs_usd
any Absolute profit in USD over the time range
anyOf[0]
number anyOf[1]
null roi
any Return on investment as a decimal (e.g. 0.1 = 10%)
anyOf[0]
number anyOf[1]
null weighted_apr
any Weighted annual percentage rate
anyOf[0]
number anyOf[1]
null holding_time_days
any Number of days the position has been held
anyOf[0]
integer anyOf[1]
null rewards_tokens
any Reward tokens earned over the time range
anyOf[0]
array items
object additionalProperties
any anyOf[1]
null rewards_usd
any Total rewards value in USD
anyOf[0]
number anyOf[1]
null rewards_roi
any Return on investment from rewards only
anyOf[0]
number anyOf[1]
null rwa_price_usd
any RWA token price in USD
anyOf[0]
number anyOf[1]
null claimed_fees
any Claimed LP fees in token amounts
anyOf[0]
array items
object additionalProperties
any anyOf[1]
null unclaimed_fees
any Unclaimed LP fees in token amounts
anyOf[0]
array items
object additionalProperties
any anyOf[1]
null impermanent_loss
any Impermanent loss in token amounts
anyOf[0]
array items
object additionalProperties
any anyOf[1]
null claimed_fees_usd
any Claimed LP fees in USD
anyOf[0]
number anyOf[1]
null unclaimed_fees_usd
any Unclaimed LP fees in USD
anyOf[0]
number anyOf[1]
null impermanent_loss_usd
any Impermanent loss in USD
anyOf[0]
number anyOf[1]
null inflow_usd
any Total inflow value in USD over the time range
anyOf[0]
number anyOf[1]
null outflow_usd
any Total outflow value in USD over the time range
anyOf[0]
number anyOf[1]
null value_usd_start
any Position value in USD at the start of the time range
anyOf[0]
number anyOf[1]
null value_usd_end
any Position value in USD at the end of the time range
anyOf[0]
number anyOf[1]
null inflow_amount
any Total inflow in token amount
anyOf[0]
number anyOf[1]
null outflow_amount
any Total outflow in token amount
anyOf[0]
number anyOf[1]
null amount_start
any Token amount at the start of the time range
anyOf[0]
number anyOf[1]
null amount_end
any Token amount at the end of the time range
anyOf[0]
number anyOf[1]
null meta
any anyOf[0]
ResponseMeta object Response metadata including cache and performance information.
cached_at
any anyOf[0]
integer anyOf[1]
null system
any anyOf[0]
ProcessingInfo object Server-side processing time breakdown by subsystem.
click_time
number node_time
number microservices_time
number redis_time
number total_time
number anyOf[1]
null anyOf[1]
null JSON
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"result": [
{
"index": null,
"profit_abs_usd": null,
"roi": null,
"weighted_apr": null,
"holding_time_days": null,
"rewards_tokens": null,
"rewards_usd": null,
"rewards_roi": null,
"rwa_price_usd": null,
"claimed_fees": null,
"unclaimed_fees": null,
"impermanent_loss": null,
"claimed_fees_usd": null,
"unclaimed_fees_usd": null,
"impermanent_loss_usd": null,
"inflow_usd": null,
"outflow_usd": null,
"value_usd_start": null,
"value_usd_end": null,
"inflow_amount": null,
"outflow_amount": null,
"amount_start": null,
"amount_end": null
}
],
"meta": null
}