instadapp_portfolio
Get the account's positions and assets in the Instadapp protocol.
You can specify the account address and then you can query the account's Deposit, Farming, Reward, Staked assets in the Instadapp protocol. Using this API, you are able to acknowledge the detailed information like Deposit token 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) - "instadapp".
  • 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 the erc20 token.
    • balanceTokens(array of token objects) - the user's token.
    • rewardTokens(array of token objects) - the user's reward tokens.
    • usdValue(string) - the USD balance of user's token.
    • section(string) - the categories of token assets : Deposit, Farming...
    • tokens(array of token objects) - the USD balance of user's token.
    • Token Object schema:
    • contractAddress(string) - erc20 token address
    • symbol(string) - the symbol of the erc20 token.
    • balance(string) - the balance of user's token.
    • usdValue(string) - the USD balance of user's token.

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":"instadapp",
"accountAddress": "0x7bdb45b1fe5b3eb17a4c7a16c9750c7e10ccf08d"
}
}'

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"usdAmount": "20943",
"tokensInfos": [
{
"contractAddress": "0x621AD080ad3B839e7b19e040C77F05213AB71524",
"symbol": "Proxy Balance #28993",
"balanceTokens": [
{
"contractAddress": "0x1985365e9f78359a9B6AD760e32412f4a445E862",
"symbol": "REP",
"balance": "2328.09",
"usdValue": "16541"
},
{
"contractAddress": "0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb",
"symbol": "INST",
"balance": "6013.53",
"usdValue": "4301"
}
],
"usdValue": "20842",
"section": "Deposit"
},
{
"contractAddress": "0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb",
"symbol": "INST + ETH",
"balanceTokens": [
{
"contractAddress": "0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb",
"symbol": "INST",
"balance": "100.32",
"usdValue": "72"
},
{
"contractAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"symbol": "ETH",
"balance": "0.00",
"usdValue": "0"
}
],
"usdValue": "101",
"section": "Farming",
"rewardTokens": [
{
"contractAddress": "0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb",
"symbol": "INST",
"balance": "39.87",
"usdValue": "29"
}
]
}
]
}
}
Copy link
Outline
Parameters
Returns
Example
Request
Result