Get protocols snapshot
Get protocols snapshot: underlying tokens, rewards, fees, etc. for all supported protocols on current block or at the specified timestamp
Supported on: Ethereum Base Solana BNB Chain Sonic Unichain Arbitrum Avalanche ZKsync Gnosis Optimism Polygon Linea
Parameters
addresses
* array queryWallet addresses
chain_id
any queryBlockchain chain identifier
timestamp
any queryUnix timestamp for historical snapshot
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/snapshot';
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
AdapterResult object Snapshot of a single DeFi position or token holding for an address.
index
* string Unique position identifier
chain_id
* integer Blockchain chain identifier
contract_address
*AddressType any anyOf[0]
string anyOf[1]
string token_id
* integer Token identifier (0 for non-NFT positions)
address
*AddressType any anyOf[0]
string anyOf[1]
string block_number_created
* integer Block number when the position was first created
block_number
any Block number of the snapshot
anyOf[0]
integer anyOf[1]
null timestamp
any Unix timestamp of the snapshot
anyOf[0]
integer anyOf[1]
null protocol_type
* string Protocol type identifier (e.g. lending, dex, staking)
protocol_handler_id
* string Protocol handler identifier
protocol_group_id
* string Protocol group identifier (e.g. aave-v3, uniswap-v3)
protocol_group_name
* string Human-readable protocol group name
protocol_group_icon
* any URL of the protocol group icon
anyOf[0]
string anyOf[1]
null protocol_group_url
any Dapp URL of the protocol group
anyOf[0]
string anyOf[1]
null protocol_sub_group_id
any Protocol sub-group identifier
anyOf[0]
string anyOf[1]
null protocol_sub_group_name
any Human-readable protocol sub-group name
anyOf[0]
string anyOf[1]
null contract_name
* string Name of the contract or token
contract_symbol
* string Symbol of the contract or token
asset_sign
* integer Asset sign: 1 for supply/deposit, -1 for borrow/debt
status
Status integer (Enum)Position status indicating whether a DeFi position is active or closed.
1
0
-1
underlying_tokens
array List of underlying token balances in the position
items
object additionalProperties
any reward_tokens
array List of reward token balances accrued
items
object additionalProperties
any value_usd
any Total USD value of the position
anyOf[0]
number anyOf[1]
null locked
boolean Whether the position is locked (e.g. vesting, timelock)
additionalProperties
none 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
32
{
"result": [
{
"index": "0x1111111111111111",
"chain_id": 0,
"contract_address": null,
"token_id": 0,
"address": null,
"block_number_created": 0,
"block_number": null,
"timestamp": null,
"protocol_type": "string",
"protocol_handler_id": "string",
"protocol_group_id": "string",
"protocol_group_name": "string",
"protocol_group_icon": null,
"protocol_group_url": null,
"protocol_sub_group_id": null,
"protocol_sub_group_name": null,
"contract_name": "string",
"contract_symbol": "string",
"asset_sign": 0,
"status": 1,
"underlying_tokens": [null],
"reward_tokens": [null],
"value_usd": null,
"locked": false
}
],
"meta": null
}