> ## Documentation Index
> Fetch the complete documentation index at: https://developers.zerion.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get wallet portfolio

> This endpoint returns the portfolio overview of a web3 wallet.

**Temporary limitations for Solana addresses:**
- Doesn't support protocol positions

> NOTE: Don't forget to stop retries after some reasonable period of time. If the `200` status is not returned within 2 minutes it most probably means that some unexpected error occurred and the client should stop the polling.

> NOTE: Consider all IDs as abstract strings, without making any assumptions about their format or relying on such assumptions. There is a non-zero probability that IDs may change in the future, and this should not result in any breaking changes.




## OpenAPI

````yaml /openapi-v1.yaml get /v1/wallets/{address}/portfolio
openapi: 3.0.3
info:
  version: 1.0.0
  title: REST API
  description: REST-like API provides access to rich Zerion ecosystem.
  contact:
    name: Zerion API
    url: https://developers.zerion.io/
    email: api@zerion.io
servers:
  - description: Production API
    url: https://api.zerion.io
security:
  - APIKeyBasicAuth: []
tags:
  - name: wallets
    description: >-
      Operations related to wallets, such as portfolio charts, positions, and
      transactions.
  - name: wallet sets
    description: >-
      Operations on a wallet set — aggregated portfolio data across at most one
      EVM address and one Solana address queried together.
  - name: fungibles
    description: >-
      Operations related to fungible assets, such as list them all, search or
      get by ID.
  - name: chains
    description: Operations related to chains, such as list all chains.
  - name: swap
    description: Operations related to swapping and bridging assets.
  - name: gas
    description: Operations related to gas.
  - name: nfts
    description: >-
      Operations related to non fungible assets, such list them, search or get
      by ID.
  - name: dapps
    description: >-
      Operations related to decentralized applications, such as list them all,
      search or get by ID.
  - name: subscriptions to transactions
    description: Operations related to subscriptions to transactions.
paths:
  /v1/wallets/{address}/portfolio:
    get:
      tags:
        - wallets
      summary: Get wallet portfolio
      description: >
        This endpoint returns the portfolio overview of a web3 wallet.


        **Temporary limitations for Solana addresses:**

        - Doesn't support protocol positions


        > NOTE: Don't forget to stop retries after some reasonable period of
        time. If the `200` status is not returned within 2 minutes it most
        probably means that some unexpected error occurred and the client should
        stop the polling.


        > NOTE: Consider all IDs as abstract strings, without making any
        assumptions about their format or relying on such assumptions. There is
        a non-zero probability that IDs may change in the future, and this
        should not result in any breaking changes.
      operationId: getWalletPortfolio
      parameters:
        - name: filter[positions]
          in: query
          required: false
          description: >
            This parameter allows to customize the aggregation of DeFi positions
            within a portfolio based on their types. The aggregation can
            include:

              - `only_simple`: Only includes wallet-type positions, which are basic, non-protocol related assets. This is the default selection if the parameter is not specified.
              - `only_complex`: Aggregates positions associated with DeFi protocols only (e.g., staked assets, liquidity pools), like Uniswap or Aave, excluding simple wallet positions.
              - `no_filter`: Provides an aggregated view of both protocol-related and simple wallet positions without any filtering.

            The selection of filters affects the composition of the aggregated
            portfolio results, allowing for tailored analysis and reporting
            based on the types of positions of interest.


            > ⚠️ Note: Enterprise usage of this API may be subject to different
            pricing models depending on the selected filter type. For detailed
            pricing information, please contact `api@zerion.io`.
          schema:
            type: string
            default: only_simple
            enum:
              - only_simple
              - only_complex
              - no_filter
        - $ref: '#/components/parameters/Currency'
        - $ref: '#/components/parameters/WalletAddress'
        - name: sync
          in: query
          required: false
          description: >
            Controls whether the endpoint should trigger a synchronous position
            data refresh before responding.


            - `true`: Triggers a position sync and waits up to 30 seconds for
            portfolio data to be refreshed from the blockchain before
            responding. If data is ready sooner, the response is returned
            immediately. If data is not ready within 30 seconds, a timeout error
            may occur.

            - `false` (default): The endpoint returns immediately with cached
            portfolio data without triggering any position sync.


            > NOTE: When using `sync=true`, be prepared to handle longer
            response times (up to 30 seconds). Ensure your client timeout
            settings accommodate this duration.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          $ref: '#/components/responses/PortfolioResponse'
        '400':
          $ref: '#/components/responses/MalformedParameters'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    Currency:
      name: currency
      in: query
      required: false
      description: Denominated currency value of returned prices
      schema:
        type: string
        default: usd
        enum:
          - eth
          - btc
          - usd
          - eur
          - krw
          - rub
          - gbp
          - aud
          - cad
          - inr
          - jpy
          - nzd
          - try
          - zar
          - cny
          - chf
    WalletAddress:
      name: address
      in: path
      required: true
      description: >-
        The web3 wallet address. Must be a valid EVM or Solana address. Returns
        400 if the address is not tracked by Zerion.
      example: '0x42b9df65b219b3dd36ff330a4dd8f327a6ada990'
      schema:
        $ref: '#/components/schemas/WalletAddress'
  responses:
    PortfolioResponse:
      description: Response for requested wallet's portfolio
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Response-2'
    MalformedParameters:
      description: Parameters are malformed
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Parameter is malformed
                    detail:
                      type: string
                      description: Long description of the error
                      example: Some validation errors will be described here
    UnauthenticatedError:
      description: Unathenticated request
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Unauthorized Error
                    detail:
                      type: string
                      description: Long description of the error
                      example: >-
                        The API key is invalid, please, make sure that you are
                        using a valid key
    TooManyRequests:
      description: Too many requests error
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Too many requests
                    detail:
                      type: string
                      description: Long description of the error
                      example: Your request had been throttled
  schemas:
    WalletAddress:
      oneOf:
        - $ref: '#/components/schemas/EVMAddress'
        - $ref: '#/components/schemas/SolanaAddress'
      description: A wallet address, which can be either an EVM or Solana address
    Response-2:
      type: object
      required:
        - links
        - data
      properties:
        links:
          $ref: '#/components/schemas/ResponseLinks-2'
        data:
          $ref: '#/components/schemas/Container-2'
    EVMAddress:
      type: string
      description: Ethereum-compatible address (EVM).
      pattern: ^0x[a-fA-F0-9]{40}$
      example: '0x42b9df65b219b3dd36ff330a4dd8f327a6ada990'
    SolanaAddress:
      type: string
      description: Solana address
      pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
      example: 8BH9pjtgyZDC4iAQH5ZiYDZ1MDWC98xki2V8NzqqKW3K
    ResponseLinks-2:
      type: object
      required:
        - self
      properties:
        self:
          type: string
          format: url
          example: >-
            https://api.zerion.io/v1/wallets/0x42b9df65b219b3dd36ff330a4dd8f327a6ada990/portfolio
    Container-2:
      type: object
      required:
        - type
        - id
        - attributes
      properties:
        type:
          type: string
          description: Resource type
          enum:
            - portfolio
        id:
          type: string
          description: Portfolio unique ID
          example: '0x42b9df65b219b3dd36ff330a4dd8f327a6ada990'
        attributes:
          $ref: '#/components/schemas/Attributes-3'
    Attributes-3:
      type: object
      properties:
        positions_distribution_by_type:
          $ref: '#/components/schemas/PositionsDistributionByType'
        positions_distribution_by_chain:
          $ref: '#/components/schemas/PositionsDistributionByChain'
        total:
          $ref: '#/components/schemas/Total'
        changes:
          $ref: '#/components/schemas/Change'
    PositionsDistributionByType:
      type: object
      required:
        - wallet
        - deposited
        - borrowed
        - locked
        - staked
      properties:
        wallet:
          type: number
          format: float
          description: Total value of asset on the wallet in selected currency
          example: 1864.774102420957
        deposited:
          type: number
          format: float
          description: Total value of deposited assets in selected currency
          example: 78.04192492782934
        borrowed:
          type: number
          format: float
          description: Total value of borrowed assets in selected currency
          example: 0.9751475798305564
        locked:
          type: number
          format: float
          description: Total value of locked assets in selected currency
          example: 5.780032725068765
        staked:
          type: number
          format: float
          description: Total value of staked assets in selected currency
          example: 66.13183205505294
    PositionsDistributionByChain:
      type: object
      additionalProperties:
        type: number
        format: double
        description: Total value of asset on the chain in selected currency
      example:
        arbitrum: 458.3555051522226
        aurora: 72.01031337463428
        avalanche: 17.128850607339444
        base: 55.01550749900544
        binance-smart-chain: 5.561075880033699
        celo: 31.293849330045006
        ethereum: 1214.009900354964
        fantom: 84.58514074264951
        linea: 8.258227109505139
        optimism: 573.032664994399
        polygon: 64.31407562634853
        xdai: 113.1679493137936
        zksync-era: 9.451002156306377
    Total:
      type: object
      required:
        - positions
      description: Total portfolio values across all wallet positions and NFT
      properties:
        positions:
          type: number
          format: float
          description: Total value of all positions
          example: 2017.4858230069574
    Change:
      type: object
      description: Portfolio changes
      required:
        - absolute_1d
        - percent_1d
      properties:
        absolute_1d:
          type: number
          format: float
          description: Daily absolute portfolio change value
          example: 102.0271468171374
        percent_1d:
          type: number
          format: float
          description: Daily portfolio change percent
          example: 5.326512552079021
  securitySchemes:
    APIKeyBasicAuth:
      type: http
      scheme: basic
      description: >-
        To test endpoints here, paste your API key from the
        [dashboard](https://dashboard.zerion.io/) into the username field and
        leave the password empty.

````