AssetByProtocols

AssetByProtocols is a record of key / Protocol

"assetByProtocols": {
    "camelot": {
                "name": "Camelot",
                "key": "camelot",
                "value": "448.8915070154729479738494878216512",
                "totalCostBasis": "0",
                "totalClosedPnl": "0",
                "totalOpenPnl": "448.8915070154729479738494878216512",
                "chains": {
                    "arbitrum": {
                        "name": "Arbitrum",
                        "key": "arbitrum",
                        "value": "448.8915070154729479738494878216512",
                        "totalCostBasis": "0",
                        "totalClosedPnl": "0",
                        "totalOpenPnl": "448.8915070154729479738494878216512",
                        "protocolPositions": {
                            "REWARDS": {
                                "assets": [
                                    {
                                        "balance": "0.027360076152603174",
                                        "chainContract": "arbitrum:0x3d9907f9a368ad0a51be60f7da3b97cf940982d8",
                                        "chainKey": "arbitrum",
                                        "contract": "0x3d9907f9a368ad0a51be60f7da3b97cf940982d8",
                                        "decimal": "18",
                                        "name": "camelot token",
                                        "openPnl": "0",
                                        "price": "857.5030282598688",
                                        "symbol": "grail",
                                        "totalCostBasis": "0",
                                        "value": "23.4613481542778419450964757035712"
                                    }
                                ],
                                "name": "Rewards",
                                "protocolPositions": [],
                                "totalOpenPnl": "23.4613481542778419450964757035712",
                                "totalCostBasis": "0",
                                "totalValue": "23.4613481542778419450964757035712",
                                "unlockAt": "0"
                            },
                            "LOCKED": {
                                "assets": [
                                    {
                                        "balance": "0.031381407411028524",
                                        "chainContract": "arbitrum:0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
                                        "chainKey": "arbitrum",
                                        "contract": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
                                        "decimal": "18",
                                        "name": "weth",
                                        "openPnl": "107.90747989541446205592",
                                        "price": "3438.58",
                                        "symbol": "weth",
                                        "totalCostBasis": "0",
                                        "value": "107.90747989541446205592"
                                    },
                                    {
                                        "balance": "317.5861835015738",
                                        "chainContract": "arbitrum:0xaf88d065e77c8cc2239327c5edb3a432268e5831",
                                        "chainKey": "arbitrum",
                                        "contract": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
                                        "decimal": "6",
                                        "name": "usd coin",
                                        "openPnl": "317.52267896578064397283301211808",
                                        "price": "0.9998000399920016",
                                        "symbol": "usdc",
                                        "totalCostBasis": "0",
                                        "value": "317.52267896578064397283301211808"
                                    }
                                ],
                                "name": "Locked",
                                "protocolPositions": [],
                                "totalOpenPnl": "425.43015886119510602875301211808",
                                "totalCostBasis": "0",
                                "totalValue": "425.43015886119510602875301211808",
                                "unlockAt": "1724082187"
                            }
                        }
                    }
                }
            }
}

The key of the record is the uniq key of the protocol. If you have multiple positions on 1 protocol (can be multichain), all these positions will be nested on the protocol position.

Note: The protocol with the key 'WALLET' represents the assets held within the wallet for the specified address. wallet is considered a protocol within the assetByProtocols structure.

Typing

Key
Type
Description

name

string

Name of the protocol.

key

string

Protocol identifier key.

value

string

Total value of assets in the protocol.

totalCostBasis

string

Total cost basis of protocol assets.

totalClosedPnl

string

Total closed profit and loss for protocol.

totalOpenPnl

string

Total open profit and loss for protocol.

imgSmall

string

Url of the protocol image (small) includeImages param must be set to true

imgLarge

string

Url of the protocol image (large)includeImages param must be set to true

Record<string, Chain>

Chain-level breakdown of the protocol. The string key on the Record is the uniq key of the chain

Last updated