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

# List positions

> Get an owner's tokenized-asset holdings, priced and aggregated.

Returns positions across every asset family the account holds — Ondo equities,
Midas RWA yield tokens, and IXS managed vaults — each valued in USD (equities
from the Ondo feed, RWA at the latest indexed NAV) with a `total_usd` total.
The account is derived from `owner`; pass `chain` for Base (Midas) or BNB Smart
Chain (IXS) holdings.



## OpenAPI

````yaml /v2/combined_spec.json get /v2/tokenized_assets/positions
openapi: 3.1.0
info:
  title: Compass API
  description: Compass Labs DeFi API
  version: 0.0.1
servers:
  - url: https://api.compasslabs.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v2/tokenized_assets/positions:
    get:
      tags:
        - Tokenized Assets
      summary: List positions
      description: >-
        Get an owner's tokenized-asset holdings, priced and aggregated.


        Returns positions across every asset family the account holds — Ondo
        equities,

        Midas RWA yield tokens, and IXS managed vaults — each valued in USD
        (equities

        from the Ondo feed, RWA at the latest indexed NAV) with a `total_usd`
        total.

        The account is derived from `owner`; pass `chain` for Base (Midas) or
        BNB Smart

        Chain (IXS) holdings.
      operationId: v2_tokenized_assets_positions
      parameters:
        - name: owner
          in: query
          required: true
          schema:
            type: string
            title: Owner
            default: '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B'
          description: >-
            The address of the owner of the Tokenized Assets Account to get
            positions for. The account address is derived deterministically from
            this owner; balances are read from the derived account.
        - name: chain
          in: query
          required: false
          schema:
            type: string
            enum:
              - base
              - ethereum
              - arbitrum
              - hyperevm
              - tempo
              - bsc
            title: Chain
            description: The chain to use.
          description: >-
            Network to read positions on (defaults to Ethereum). Equities exist
            on Ethereum only; RWA yield assets also exist on Base.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenizedAssetsPositionsResponse'
        '400':
          description: >-
            `ACCOUNT_NOT_DEPLOYED` — the requesting `owner` does not have a
            Tokenized Assets Account on the requested network. Call `POST
            /v2/tokenized_assets/create_account` first.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenizedAssetsErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: '`ONDO_API_UNAVAILABLE` — upstream provider is unavailable.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenizedAssetsErrorResponse'
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from compass_api_sdk import CompassAPI


            with CompassAPI(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as compass_api:

                res = compass_api.tokenized_assets.tokenized_assets_positions(owner="0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B")

                # Handle response
                print(res)
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { CompassApiSDK } from "@compass-labs/api-sdk";

            const compassApiSDK = new CompassApiSDK({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await compassApiSDK.tokenizedAssets.tokenizedAssetsPositions({
                owner: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    TokenizedAssetsPositionsResponse:
      properties:
        owner:
          type: string
          title: Owner
          description: >-
            Owner address from the request. Balances are read from the Tokenized
            Assets Account address derived from this owner.
        positions:
          items:
            $ref: >-
              #/components/schemas/compass__api_backend__v2__models__tokenized_assets__read__response__positions__Position
          type: array
          title: Positions
          description: Non-zero positions only; tokens with a zero balance are omitted.
          default: []
        total_usd:
          type: string
          title: Total Usd
          description: Sum of `balance_usd` across positions where the price is known.
        pnl:
          anyOf:
            - $ref: '#/components/schemas/TokenizedAssetsPnl'
            - type: 'null'
          description: >-
            Account-level PnL summed across positions that have a known PnL;
            `null` when no position can be priced.
      type: object
      required:
        - owner
        - total_usd
      title: TokenizedAssetsPositionsResponse
      description: >-
        On-chain tokenized-equity holdings for an owner's Tokenized Assets
        Account.
      example:
        owner: '0x2ed5C9c14E1F8baA94CD3e9b5b6e3F8e3D27504F'
        positions:
          - balance: '20.745964'
            balance_usd: '7361.10'
            contract_address: '0xf6b1117ec07684D3958caD8BEb1b302bfD21103f'
            current_price_usd: '354.82'
            decimals: 18
            name: Tesla, Inc.
            symbol: TSLAon
            underlying_ticker: TSLA
          - balance: '5.000000'
            balance_usd: '1145.65'
            contract_address: '0x6cdcF8C170552DCA1a4dD8Bb1aB6dB7e7E0bF7c4'
            current_price_usd: '229.13'
            decimals: 18
            name: Apple Inc.
            symbol: AAPLon
            underlying_ticker: AAPL
        total_usd: '8506.75'
    TokenizedAssetsErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: >-
            Short human-readable error label (e.g. `Market not found.`,
            `Insufficient liquidity`, `Order not found.`).
        message:
          type: string
          title: Message
          description: Human-readable explanation.
      type: object
      required:
        - error
        - message
      title: TokenizedAssetsErrorResponse
      description: >-
        Standard error envelope returned by every non-2xx response.


        Surfaced in OpenAPI ``responses`` declarations so SDK consumers can
        decode

        failures uniformly without inspecting per-status-code shapes.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    compass__api_backend__v2__models__tokenized_assets__read__response__positions__Position:
      properties:
        symbol:
          type: string
          title: Symbol
          description: On-chain Ondo symbol (e.g. `TSLAon`).
        underlying_ticker:
          type: string
          title: Underlying Ticker
          description: Underlying equity ticker.
        name:
          type: string
          title: Name
          description: Underlying equity name (or ticker fallback).
        contract_address:
          type: string
          title: Contract Address
          description: Ethereum mainnet ERC-20 address.
        decimals:
          type: integer
          title: Decimals
          description: ERC-20 decimals.
        balance:
          type: string
          title: Balance
          description: Human-readable balance (already scaled by `decimals`).
        current_price_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Current Price Usd
          description: USD spot price at read time (decimal string).
        balance_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Balance Usd
          description: '`balance * current_price_usd` when the price is available.'
        provider:
          $ref: '#/components/schemas/TokenizedAssetProvider'
          description: Issuer of this tokenized asset ('ondo' equities, 'midas' RWA yield).
          default: ondo
        asset_class:
          $ref: '#/components/schemas/TokenizedAssetClass'
          description: Asset class of this position.
          default: EQUITY
        chain:
          $ref: '#/components/schemas/Chain'
          description: Network the position is held on ('ethereum' or 'base').
          default: ethereum
        pnl:
          anyOf:
            - $ref: '#/components/schemas/TokenizedAssetsPnl'
            - type: 'null'
          description: >-
            Realized + unrealized PnL for this position, or `null` when it
            cannot be priced (no current price, or externally-funded inventory
            with no on-chain cost basis).
        events:
          items:
            $ref: '#/components/schemas/TokenizedAssetsActivityEvent'
          type: array
          title: Events
          description: >-
            Chronological activity for this position (buy / sell / transfer_in /
            transfer_out). Pure-USDC funding is excluded — it appears on the
            balances endpoint.
          default: []
      type: object
      required:
        - symbol
        - underlying_ticker
        - name
        - contract_address
        - decimals
        - balance
      title: Position
      description: One non-zero on-chain position in a tokenized equity.
      example:
        balance: '20.745964'
        balance_usd: '7361.10'
        contract_address: '0xf6b1117ec07684D3958caD8BEb1b302bfD21103f'
        current_price_usd: '354.82'
        decimals: 18
        name: Tesla, Inc.
        symbol: TSLAon
        underlying_ticker: TSLA
    TokenizedAssetsPnl:
      properties:
        total_deposited:
          type: string
          title: Total Deposited
          description: Total USDC paid for this position over all time.
        current_value:
          type: string
          title: Current Value
          description: >-
            Current USD value of the held balance (`balance *
            current_price_usd`).
        unrealized_pnl:
          type: string
          title: Unrealized Pnl
          description: '`current_value` minus the remaining cost basis.'
        realized_pnl:
          type: string
          title: Realized Pnl
          description: Realized profit/loss banked from past sales.
        total_pnl:
          type: string
          title: Total Pnl
          description: '`unrealized_pnl + realized_pnl`.'
        total_pnl_percent:
          type: string
          title: Total Pnl Percent
          description: '`(total_pnl / total_deposited) * 100`.'
      type: object
      required:
        - total_deposited
        - current_value
        - unrealized_pnl
        - realized_pnl
        - total_pnl
        - total_pnl_percent
      title: TokenizedAssetsPnl
      description: >-
        Realized + unrealized PnL for a tokenized-asset position.


        Mirrors Earn's ``pnl`` shape so SDK/widget reuse is trivial. Cost basis
        is

        the USDC paid for the position through its product account;
        ``current_value``

        marks the held balance to the current price. All amounts are USD decimal

        strings; ``total_pnl_percent`` is a percentage (also a decimal string).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TokenizedAssetProvider:
      type: string
      enum:
        - ondo
        - midas
        - ixs
      title: TokenizedAssetProvider
      description: Issuer/provider of a tokenized asset.
    TokenizedAssetClass:
      type: string
      enum:
        - EQUITY
        - T_BILLS
        - BASIS_TRADE
        - BTC_YIELD
        - MANAGED_VAULT
      title: TokenizedAssetClass
      description: >-
        Asset class of a tokenized asset.


        `EQUITY` trades via the order endpoints (build/submit/cancel); the RWA

        yield classes (`T_BILLS`, `BASIS_TRADE`, `BTC_YIELD`) and
        `MANAGED_VAULT`

        trade via the swap-based `transact/buy` and `transact/sell` endpoints.

        `MANAGED_VAULT` (IXS ERC-4626 vaults) is special in that a sell is an

        *asynchronous* redemption request settled off-chain by the vault
        operator.
    Chain:
      type: string
      enum:
        - base
        - ethereum
        - arbitrum
        - hyperevm
        - tempo
        - bsc
      title: Chain
      description: The chain to use.
    TokenizedAssetsActivityEvent:
      properties:
        event_type:
          type: string
          enum:
            - buy
            - sell
            - transfer_in
            - transfer_out
          title: Event Type
          description: Kind of activity for this transaction.
        block_number:
          type: integer
          title: Block Number
          description: Block the transaction was mined in.
        block_timestamp:
          type: string
          format: date-time
          title: Block Timestamp
          description: Time the transaction was mined.
        transaction_hash:
          type: string
          title: Transaction Hash
          description: Transaction hash.
        input_amount:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Amount
          description: 'Amount sent: USDC for a buy, tokens for a sell/transfer_out.'
        input_symbol:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Symbol
          description: Symbol of the sent leg, or `null` for a transfer_in.
        output_amount:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Amount
          description: 'Amount received: tokens for a buy/transfer_in, USDC for a sell.'
        output_symbol:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Symbol
          description: Symbol of the received leg, or `null` for a transfer_out.
        cost_per_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Cost Per Unit
          description: Cost basis per token at buy time; `null` for non-buys.
        realized_pnl:
          anyOf:
            - type: string
            - type: 'null'
          title: Realized Pnl
          description: Realized profit/loss on a sell; `null` for non-sells.
      type: object
      required:
        - event_type
        - block_number
        - block_timestamp
        - transaction_hash
      title: TokenizedAssetsActivityEvent
      description: >-
        One classified activity event on a tokenized-asset position.


        Mirrors Earn's deposit/withdrawal event shape (generic
        ``input``/``output``

        legs) with an ``event_type`` discriminator, so buys, sells and transfers
        share

        one chronological feed. A ``buy`` has ``input`` = USDC paid and
        ``output`` =

        tokens received (``cost_per_unit`` = USDC/token); a ``sell`` is the
        reverse and

        carries ``realized_pnl``; a ``transfer_in``/``transfer_out`` carries
        only the

        token leg, so the opposite side is ``null``. All amounts are decimal
        strings.

        Pure-USDC funding movements are not position activity — they appear on
        the

        balances endpoint.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Compass API Key. Get your key
        [here](https://www.compasslabs.ai/dashboard).

````