Introduction

The Portfolio API provides information associated with – no surprise – portfolios!

A portfolio is a collection of token holdings. These holdings computed from a list of addresses. If, for example, you control addresses 0xa and 0xb, and 0xa held:

  • 10 ETH, and

  • 2 AAVE,

while 0xb held:

  • 2 ETH, and

  • 3 MKR,

your potfolio would be:

  • 12 ETH,

  • 2 AAVE, and

  • 3 MKR.

A list of addresses is therefore the starting point for all portfolio endpoints. We currently provide endpoints to retrieve:

  • positions (current and historical),

  • values (current and historical), and

  • returns.

Positions

A position is tuple made up of a token address and an amount. We compute positions by summing all token deposits and withdrawals to a wallet address.

For information about how we do this under the hood and a potential problem with this approach, please see this blog (in press).

Values

Every position has a value. Values are quoted with regards to another token. The default token is USD (0x0000000000000000000000000000000000000348), a representation the fiat US Dollar.

A portfolio's value is the sum of all position values.

Returns

Returns for a position is computed by subtracting the position value at time of purchase from its current value. This number can, of course, be negative. A position may be built up via multiple purchases and sales (deposits and withdrawals into a wallet). These are taken into account.

Watch this Space

We release new functionality often. We never wait for perfect. If something we describe is missing, you can assume it’s coming soon. If you need it ASAP, let us know. If you think we’ve missed something, let us know.

All of the data we return is derived from immutable blockchain data. Naturally, some of it is computed.

Last updated