lido_portfolio
Get the account's positions and assets in the Lido protocol.
You can specify the account address and then you can query the account's Pool-Staked in the Lido protocol. Using this API, you are able to acknowledge the detailed information like Pool-Staked infos and USD amount of each token as well as the sections. Some DeFi investigation and strategies can be made by calling this API.
Supported on Ethereum.

Parameters

Object - An object with the following fields (required):
  • protocol(string, required) - "lido".
  • accountAddress(hex string, required) - The account you intend to check.

Returns

Object - An object with the following fields:
  • id(integer number) - json-rpc id.
  • jsonrpc(string) - json-rpc version.
  • result(object) - an object with the following fields:
    • tokenInfos(array of objects, defined below) - sorted in ascending order by USD amount.
    • usdAmount(string) - the account's USD assets in this agreement, see how usdAmount is calculated.
  • Object schema:
    • contractAddress(hex string) - the contract address of the erc20 token on chain.
    • symbol(string) - the symbol of erc20 token.
    • balance(string) - the balance of user's token.
    • usdValue(string) - the USD balance of user's token.
    • section(string) - the categories of token assets : Staked

Example

Request

curl --location --request POST 'https://apis.blockvision.org/v1/<api key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"jsonrpc": "2.0",
"method": "account_defiPortfolio",
"params": {
"protocol":"lido",
"accountAddress": "0x6cf9aa65ebad7028536e353393630e2340ca6049"
}
}'

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"usdAmount": "90974878",
"tokensInfos": [
{
"contractAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"symbol": "ETH",
"balance": "57170.29",
"usdValue": "86781491",
"section": "Pool-staked"
},
{
"contractAddress": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0",
"symbol": "MATIC",
"balance": "5192604.30",
"usdValue": "4193388",
"section": "Pool-staked"
}
]
}
}
Copy link
Outline
Parameters
Returns
Example
Request
Result