đŸ“ĻElement

Elements are the core of our data structure and it's important to understand how they are designed to properly use them inside your application.

Everything explained here can be found in this file of our open-sourced repository : https://github.com/sonarwatch/portfolio/blob/main/packages/core/src/Portfolio.ts

An Element is a group of assets owned by an address, it is designed with following values :

  • networkId : the ID of the Network of the assets.

  • platformId : the ID of the platform where the assets currently remains.

  • value : the total USD value of all assets under this element

  • type : the type of element

  • label : the label of the element

  • (optional) name : a name represented as a string

  • (optional) tags : an array of tags associated with the element

  • (optional) proxyInfo

  • data : the data where you can find all positions/assets of the element

An Element (or PortfolioElement) can be of 4 types :

Each of those types have their own type of data inside their structure, this allow us to have a unified data structure across all platforms and networks, simplifying the integration process for our clients.

Last updated