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

# Get portfolio

> Aggregate portfolio for a wallet: ELTA, veELTA, app token holdings, USD value, and unrealized P&L.

<Note>**Status: proposed.** Requires a SIWE-issued bearer token whose `sub` matches `{address}`.</Note>


## OpenAPI

````yaml /api-reference/openapi.yaml GET /portfolio/{address}
openapi: 3.1.0
info:
  title: Elata App Store API
  version: 0.1.0
  description: |
    REST API for the Elata App Store at `app.elata.bio`.

    This spec is the source of truth for the public HTTP surface that powers
    third-party app discovery, launch flows, market widgets, user portfolio
    views, rewards claims, and runtime config.

    ### Status legend

    Every operation in this spec carries an `x-elata-status` extension:

    - `stable` — implemented today on `app.elata.bio/api`. Safe to depend on.
    - `proposed` — designed here, **not yet implemented**. Spec is the contract
      the backend should build against. Subject to change.
    - `planned` — acknowledged but not yet designed. Reserved namespace.

    ### Rate limits

    | Endpoint class | Limit       |
    | -------------- | ----------- |
    | Read endpoints | 100 req/min |
    | Heavy queries  | 10 req/min  |

    Production builds should bring their own RPC provider for direct
    on-chain reads (Alchemy, Infura, QuickNode).
  contact:
    name: Elata Biosciences
    url: https://github.com/elata-biosciences
servers:
  - url: https://app.elata.bio/api
    description: Production
security:
  - {}
  - siweBearer: []
tags:
  - name: Apps
    description: App discovery and detail.
  - name: Preflight
    description: Pre-launch validation for builders before sending transactions.
  - name: Market
    description: Token prices, candles, bonding-curve state, leaderboards.
  - name: Portfolio
    description: Per-wallet holdings, history, and P&L.
  - name: Rewards
    description: Claimable rewards across protocol and per-app distributors.
  - name: Config
    description: Runtime configuration for SDKs and AI agents.
paths:
  /portfolio/{address}:
    get:
      tags:
        - Portfolio
      summary: Get aggregated portfolio
      operationId: getPortfolio
      parameters:
        - $ref: '#/components/parameters/Address'
      responses:
        '200':
          description: Aggregate portfolio.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Portfolio'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - siweBearer: []
components:
  parameters:
    Address:
      in: path
      name: address
      required: true
      schema:
        type: string
        pattern: ^0x[a-fA-F0-9]{40}$
      description: Wallet address.
  schemas:
    Portfolio:
      type: object
      properties:
        address:
          type: string
        totalValueUsd:
          type: number
        elta:
          type: object
          properties:
            balance:
              type: string
            valueUsd:
              type: number
        veElta:
          type: object
          properties:
            balance:
              type: string
            unlockTime:
              type: string
              format: date-time
              nullable: true
        appHoldings:
          type: array
          items:
            $ref: '#/components/schemas/Position'
        unrealizedPnlUsd:
          type: number
        updatedAt:
          type: string
          format: date-time
    Position:
      type: object
      properties:
        tokenAddress:
          type: string
        symbol:
          type: string
        balance:
          type: string
        valueUsd:
          type: number
        avgEntryPriceUsd:
          type: number
          nullable: true
        unrealizedPnlUsd:
          type: number
          nullable: true
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: not_found
            message:
              type: string
            details:
              type: object
              additionalProperties: true
  responses:
    Unauthorized:
      description: Missing or invalid SIWE bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    siweBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        SIWE-issued JWT, scoped to a wallet address. Obtain via Sign-In With
        Ethereum (EIP-4361) against `app.elata.bio`. Required for personalized
        Portfolio and Rewards endpoints. The `sub` claim is the wallet address;
        a request whose path `{address}` does not match the `sub` is rejected.

````