Octav - API Documentation
  • Welcome
  • Getting Started
    • API Access
    • Portfolio
    • Wallet
    • Transactions
    • Synchronization
    • Status
    • credits
  • API Models
    • Portfolio
      • AssetByProtocols
      • Chains
      • ProtocolPosition
      • Asset
      • ChainSummary
      • NFTCollection
      • NFTChain
      • NFTAsset
    • Transaction
      • Asset
      • NativeAssetFees
  • Additional Informations
    • Chains supported by Octav
    • Protocol types supported by Octav
    • Transaction type
    • Data freshness
  • Changelog
Powered by GitBook
On this page
  1. API Models
  2. Portfolio

AssetByProtocols

AssetByProtocols is a record of key / Protocol

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

totalClosedPnl

totalOpenPnl

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

PreviousPortfolioNextChains

Last updated 27 days ago

More details of the AssetByProtocols typing here :

N/A
N/A
N/A
Chains
#assetbyprotocol