Get current portfolio value breakdown

Get current portfolio value breakdown: by address, by category, by protocol group, by chain

GEThttps://api.1inch.com/portfolio/portfolio/v5.0/general/current_value
Supported on:
EthereumBaseSolanaBNB ChainAvalancheCronosZKsyncGnosisHyperEVMArcMonadOptimismPolygonLineaSonicUnichainRobinhoodArbitrum

Parameters

addresses
* array query
chain_id
any query
use_cache
boolean query

Request Body

This request doesn’t have any request body.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const axios = require('axios');

async function httpCall() {
  const url =
    'https://api.1inch.com/portfolio/portfolio/v5.0/general/current_value';

  const config = {
    headers: {
      Authorization: `Bearer ${API_KEY}`,
    },
    params: {},
    paramsSerializer: {
      indexes: null,
    },
  };

  try {
    const response = await axios.get(url, config);
    console.log(response.data);
  } catch (error) {
    console.error(error);
  }
}

Returns

ResponseEnvelope_CurrentValueResponse_ object
result
*CurrentValueResponse object
total
* number
by_address
* array
items
AddressValue object
value_usd
* number
address
* string
by_category
* array
items
CategoryValue object
value_usd
* number
category_id
* string
category_name
* string
by_protocol_group
* array
items
ProtocolGroupValue object
value_usd
* number
protocol_group_id
* string
protocol_group_name
* string
by_chain
* array
items
ChainValue object
value_usd
* number
chain_id
* integer
chain_name
* string
meta
any
anyOf[0]
ResponseMeta object
cached_at
any
anyOf[0]
integer
anyOf[1]
null
system
any
anyOf[0]
ProcessingInfo object
click_time
number
node_time
number
microservices_time
number
redis_time
number
total_time
number
anyOf[1]
null
anyOf[1]
null
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
  "result": {
    "total": 0,
    "by_address": [
      {
        "value_usd": 0,
        "address": "string"
      }
    ],
    "by_category": [
      {
        "value_usd": 0,
        "category_id": "string",
        "category_name": "string"
      }
    ],
    "by_protocol_group": [
      {
        "value_usd": 0,
        "protocol_group_id": "string",
        "protocol_group_name": "string"
      }
    ],
    "by_chain": [
      {
        "value_usd": 0,
        "chain_id": 0,
        "chain_name": "string"
      }
    ]
  },
  "meta": null
}

Did you find what you need?