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

# List all market positions by wallet address

> Supported providers & markets: Kamino Lending, Lulo.



## OpenAPI

````yaml /openapi/markets.json get /v0/positions/owners
openapi: 3.1.1
info:
  title: Markets & Positions API (Beta)
  version: 0.0.1
servers:
  - url: https://markets.dial.to/api
security:
  - apiKey: []
paths:
  /v0/positions/owners:
    get:
      tags:
        - Positions
      summary: List all market positions by wallet address
      description: 'Supported providers & markets: Kamino Lending, Lulo.'
      operationId: markets-positions.positionsV0Api.positionsByOwners
      parameters:
        - name: walletAddresses
          in: query
          required: true
          schema:
            type: string
            description: >-
              Comma separated list of owner addresses. Currently only supports
              one address.
            default: 6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176
          allowEmptyValue: true
          allowReserved: true
        - name: bundleIds
          in: query
          required: false
          schema:
            type: string
            description: >-
              Comma separated list of bundle IDs. Currently only supports one
              bundle ID.
          allowEmptyValue: true
          allowReserved: true
        - name: type
          in: query
          required: false
          schema:
            type: string
            description: >-
              Comma separated list of position types (`lending`, `yield`,
              `loop`, `reward`, `prediction`). Currently only supports one
              position type. If no position type is specified, all position
              types are returned.
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  positions:
                    type: array
                    items:
                      anyOf:
                        - $ref: '#/components/schemas/LendingPositionWithMarket'
                        - $ref: '#/components/schemas/YieldPositionWithMarket'
                        - type: object
                          properties:
                            id:
                              type: string
                            type:
                              const: loop
                            marketId:
                              type: string
                            ownerAddress:
                              type: string
                            websiteUrl:
                              type: string
                              format: uri
                            bundleId:
                              type: string
                              description: >-
                                Identifier for positions bundled into one
                                logical structure, such as position or market
                            additionalData:
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties: {}
                            amount:
                              type: number
                              description: >-
                                Current networth of the position in borrowed
                                token value
                            amountUsd:
                              type: number
                              description: Current networth of the position in USD
                            amountTokenA:
                              type: number
                              description: Supplied token amount
                            amountTokenB:
                              type: number
                              description: Borrowed token amount
                            amountTokenAUsd:
                              type: number
                            amountTokenBUsd:
                              type: number
                            ltv:
                              type: number
                              minimum: 0
                              maximum: 1
                              description: >-
                                Current Loan-to-Value before either full/partial
                                liquidation commences (depending on the
                                provider), expressed as a percentage ratio of
                                deposited value
                            liquidationPrice:
                              type: number
                              description: >-
                                Deposited token price expressed in borrowed
                                token units at which the position becomes
                                liquidatable, fully or partially.
                            leverage:
                              type: number
                              minimum: 0
                              description: >-
                                Current leverage of the position, expressed as a
                                multiplier
                            market:
                              $ref: '#/components/schemas/LoopMarket'
                          required:
                            - id
                            - type
                            - marketId
                            - ownerAddress
                            - amount
                            - amountTokenA
                            - amountTokenB
                            - market
                        - type: object
                          properties:
                            id:
                              type: string
                            type:
                              const: reward
                            ownerAddress:
                              type: string
                            bundleId:
                              type: string
                              description: >-
                                Identifier for positions bundled into one
                                logical structure, such as position or market
                            token:
                              type: object
                              properties:
                                address:
                                  type: string
                                symbol:
                                  type: string
                                decimals:
                                  type: number
                                icon:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - address
                                - symbol
                                - decimals
                                - icon
                            marketId:
                              type: string
                            position:
                              type: object
                              properties:
                                id:
                                  type: string
                                type:
                                  enum:
                                    - lending
                                    - yield
                                    - loop
                                    - reward
                                    - prediction
                                  type: string
                                side:
                                  enum:
                                    - deposit
                                    - borrow
                                  type: string
                              required:
                                - type
                            additionalData:
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties: {}
                            amount:
                              type: number
                            amountUsd:
                              type: number
                            market:
                              anyOf:
                                - $ref: '#/components/schemas/LendingMarket'
                                - $ref: '#/components/schemas/YieldMarket'
                                - $ref: '#/components/schemas/LoopMarket'
                                - $ref: '#/components/schemas/PerpetualMarket'
                          required:
                            - id
                            - type
                            - ownerAddress
                            - token
                            - marketId
                            - amount
                        - type: object
                          properties:
                            id:
                              type: string
                            type:
                              const: prediction
                            ownerAddress:
                              type: string
                            bundleId:
                              type: string
                              description: >-
                                Identifier for positions bundled into one
                                logical structure, such as position or market
                            marketId:
                              type: string
                            token:
                              type: object
                              properties:
                                address:
                                  type: string
                                symbol:
                                  type: string
                                decimals:
                                  type: number
                                icon:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - address
                                - symbol
                                - decimals
                                - icon
                                - name
                            side:
                              enum:
                                - 'yes'
                                - 'no'
                              type: string
                            additionalData:
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties: {}
                            amount:
                              type: number
                            amountUsd:
                              type: number
                            costBasisTotal:
                              type: number
                            costBasisAvg:
                              type: number
                            pnl:
                              type: object
                              properties:
                                total:
                                  type: number
                                realized:
                                  type: number
                                unrealized:
                                  type: number
                                realizedLifetime:
                                  type: number
                                totalLifetime:
                                  type: number
                                unrealizedPct:
                                  type: number
                                capital:
                                  type: object
                                  properties:
                                    invested:
                                      type: number
                                      description: >-
                                        Sum of all buy costs within the active
                                        position
                                    investedLifetime:
                                      type: number
                                      description: >-
                                        Sum of all buy costs across all
                                        re-entries for this market
                                    netFlow:
                                      type: number
                                      description: >-
                                        Net capital flow within the active
                                        position: sell proceeds minus buy costs.
                                        Negative means own capital is still
                                        locked in the position; positive means
                                        the initial investment has been fully
                                        recouped with additional realized
                                        returns
                                    netFlowLifetime:
                                      type: number
                                      description: >-
                                        Net capital flow across all re-entries
                                        for this market: sell proceeds minus buy
                                        costs. Negative means own capital is
                                        still locked in the position; positive
                                        means the initial investment has been
                                        fully recouped with additional realized
                                        returns
                                  required:
                                    - invested
                                    - investedLifetime
                                    - netFlow
                                    - netFlowLifetime
                              required:
                                - total
                                - realized
                                - unrealized
                                - realizedLifetime
                                - totalLifetime
                                - unrealizedPct
                            market:
                              type: object
                              properties:
                                id:
                                  type: string
                                type:
                                  const: prediction
                                provider:
                                  type: object
                                  properties:
                                    id:
                                      enum:
                                        - kamino
                                        - lulo
                                        - marginfi
                                        - jupiter
                                        - defituna
                                        - carrot
                                        - dflow
                                    name:
                                      type: string
                                    icon:
                                      type: string
                                  required:
                                    - id
                                    - name
                                    - icon
                                websiteUrl:
                                  type: string
                                  format: uri
                                bundleId:
                                  type: string
                                  description: >-
                                    Identifier for positions bundled into one
                                    logical structure, such as position or
                                    market
                                title:
                                  type: string
                                subtitle:
                                  type: string
                                status:
                                  enum:
                                    - open
                                    - closed
                                    - settled
                                  type: string
                                result:
                                  type: string
                                volume:
                                  type: number
                                openInterest:
                                  type: number
                                yesBid:
                                  type: number
                                noBid:
                                  type: number
                                yesAsk:
                                  type: number
                                noAsk:
                                  type: number
                                openTime:
                                  type: number
                                closeTime:
                                  type: number
                                expirationTime:
                                  type: number
                                yesToken:
                                  type: object
                                  properties:
                                    address:
                                      type: string
                                    symbol:
                                      type: string
                                    decimals:
                                      type: number
                                    icon:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - address
                                    - symbol
                                    - decimals
                                    - icon
                                    - name
                                noToken:
                                  type: object
                                  properties:
                                    address:
                                      type: string
                                    symbol:
                                      type: string
                                    decimals:
                                      type: number
                                    icon:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - address
                                    - symbol
                                    - decimals
                                    - icon
                                    - name
                                additionalData:
                                  type: object
                                  propertyNames:
                                    type: string
                                  additionalProperties: {}
                              required:
                                - id
                                - type
                                - provider
                                - title
                                - status
                          required:
                            - id
                            - type
                            - ownerAddress
                            - marketId
                            - side
                            - amount
                            - market
                required:
                  - positions
components:
  schemas:
    LendingPositionWithMarket:
      type: object
      properties:
        id:
          type: string
        type:
          const: lending
        marketId:
          type: string
        ownerAddress:
          type: string
        bundleId:
          type: string
          description: >-
            Identifier for positions bundled into one logical structure, such as
            position or market
        websiteUrl:
          type: string
          format: uri
        side:
          enum:
            - deposit
            - borrow
          type: string
        rewards:
          type: array
          items:
            type: object
            properties:
              tokenAddress:
                type: string
              amount:
                type: number
              amountUsd:
                type: number
            required:
              - tokenAddress
              - amount
        additionalData:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        actions:
          type: object
          properties:
            deposit:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            withdraw:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            borrow:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            repay:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
        amount:
          type: number
        amountUsd:
          type: number
        ltv:
          type: number
          minimum: 0
          maximum: 100
          description: >-
            Current Loan-to-Value of the position, expressed as a percentage
            ratio of deposited value
        liquidationPrice:
          type: number
          description: >-
            Deposited token price expressed in borrowed token units at which the
            position becomes liquidatable
        market:
          $ref: '#/components/schemas/LendingMarket'
      required:
        - id
        - type
        - marketId
        - ownerAddress
        - side
        - amount
        - market
    YieldPositionWithMarket:
      type: object
      properties:
        id:
          type: string
        type:
          const: yield
        marketId:
          type: string
        ownerAddress:
          type: string
        websiteUrl:
          type: string
          format: uri
        bundleId:
          type: string
          description: >-
            Identifier for positions bundled into one logical structure, such as
            position or market
        rewards:
          type: array
          items:
            type: object
            properties:
              tokenAddress:
                type: string
              amount:
                type: number
              amountUsd:
                type: number
            required:
              - tokenAddress
              - amount
        additionalData:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        amount:
          type: number
        amountUsd:
          type: number
        market:
          $ref: '#/components/schemas/YieldMarket'
      required:
        - id
        - type
        - marketId
        - ownerAddress
        - amount
        - market
    LoopMarket:
      type: object
      properties:
        id:
          type: string
        type:
          const: loop
        productName:
          type: string
        provider:
          type: object
          properties:
            id:
              enum:
                - kamino
                - lulo
                - marginfi
                - jupiter
                - defituna
                - carrot
                - dflow
            name:
              type: string
            icon:
              type: string
          required:
            - id
            - name
            - icon
        tokenA:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        tokenB:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        websiteUrl:
          type: string
          format: uri
        depositApy:
          type: number
        depositApy30d:
          type: number
        depositApy90d:
          type: number
        depositApy180d:
          type: number
        maxLeverage:
          type: number
          description: Maximum leverage allowed when depositing, expressed as a multiplier
        maxLtv:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Maximum Loan-to-Value before either full/partial liquidation
            commences (depending on the provider), expressed as a percentage
            ratio of deposited value
        liquidationLtv:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Loan-to-Value percentage ratio of deposited value at which the
            position becomes liquidatable, fully or partially.
        additionalData:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        actions:
          type: object
          properties:
            setup:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            deposit:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            withdraw:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
      required:
        - id
        - type
        - productName
        - provider
        - tokenA
        - tokenB
        - depositApy
        - maxLeverage
        - maxLtv
        - liquidationLtv
        - actions
    LendingMarket:
      type: object
      properties:
        id:
          type: string
        type:
          const: lending
        productName:
          type: string
        provider:
          type: object
          properties:
            id:
              enum:
                - kamino
                - lulo
                - marginfi
                - jupiter
                - defituna
                - carrot
                - dflow
            name:
              type: string
            icon:
              type: string
          required:
            - id
            - name
            - icon
        token:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        borrowToken:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        websiteUrl:
          type: string
          format: uri
        depositApy:
          type: number
          description: Total percentage ratio APY **including** rewards
        baseDepositApy:
          type: number
          description: APY percentage ratio excluding rewards
        baseDepositApy30d:
          type: number
          description: 30-day average APY percentage ratio excluding rewards
        baseDepositApy90d:
          type: number
          description: 90-day average APY percentage ratio excluding rewards
        baseDepositApy180d:
          type: number
          description: 180-day average APY percentage ratio excluding rewards
        borrowApy:
          type: number
          description: Total percentage ratio APY **including** rewards
        baseBorrowApy:
          type: number
          description: APY percentage ratio excluding rewards
        baseBorrowApy30d:
          type: number
          description: 30-day average APY percentage ratio excluding rewards
        baseBorrowApy90d:
          type: number
          description: 90-day average APY percentage ratio excluding rewards
        baseBorrowApy180d:
          type: number
          description: 180-day average APY percentage ratio excluding rewards
        totalDeposit:
          type: number
        totalDepositUsd:
          type: number
        totalBorrow:
          type: number
        totalBorrowUsd:
          type: number
        maxDeposit:
          type: number
        maxBorrow:
          type: number
        rewards:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  type:
                    const: deposit
                  apy:
                    type: number
                  token:
                    type: object
                    properties:
                      address:
                        type: string
                      symbol:
                        type: string
                      decimals:
                        type: number
                      icon:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - address
                      - symbol
                      - decimals
                      - icon
                  marketAction:
                    type: string
                required:
                  - type
                  - apy
                  - token
                  - marketAction
                title: Deposit Reward
                description: Reward for depositing
              - type: object
                properties:
                  type:
                    const: borrow
                  apy:
                    type: number
                  token:
                    type: object
                    properties:
                      address:
                        type: string
                      symbol:
                        type: string
                      decimals:
                        type: number
                      icon:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - address
                      - symbol
                      - decimals
                      - icon
                  marketAction:
                    type: string
                required:
                  - type
                  - apy
                  - token
                  - marketAction
                title: Borrow Reward
                description: Reward for borrowing
        maxLtv:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Maximum Loan-to-Value allowed when borrowing, expressed as a
            percentage ratio of deposited value
        liquidationLtv:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Loan-to-Value percentage ratio of deposited value at which the
            position becomes liquidatable
        liquidationPenalty:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Percentage ratio of deposited value taken as a penalty and given to
            liquidators when position is liquidated
        additionalData:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        actions:
          type: object
          properties:
            deposit:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            withdraw:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            borrow:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            repay:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            repayWithCollateral:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            claimRewards:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
      required:
        - id
        - type
        - productName
        - provider
        - token
        - depositApy
        - baseDepositApy
        - borrowApy
        - baseBorrowApy
        - totalDeposit
        - totalBorrow
        - maxBorrow
        - actions
    YieldMarket:
      type: object
      properties:
        id:
          type: string
        type:
          const: yield
        productName:
          type: string
        provider:
          type: object
          properties:
            id:
              enum:
                - kamino
                - lulo
                - marginfi
                - jupiter
                - defituna
                - carrot
                - dflow
            name:
              type: string
            icon:
              type: string
          required:
            - id
            - name
            - icon
        token:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        websiteUrl:
          type: string
          format: uri
        depositApy:
          type: number
        baseDepositApy:
          type: number
        baseDepositApy30d:
          type: number
        baseDepositApy90d:
          type: number
        baseDepositApy180d:
          type: number
        totalDeposit:
          type: number
        totalDepositUsd:
          type: number
        rewards:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  type:
                    const: deposit
                  apy:
                    type: number
                  token:
                    type: object
                    properties:
                      address:
                        type: string
                      symbol:
                        type: string
                      decimals:
                        type: number
                      icon:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - address
                      - symbol
                      - decimals
                      - icon
                  marketAction:
                    type: string
                required:
                  - type
                  - apy
                  - token
                  - marketAction
                title: Deposit Reward
                description: Reward for depositing
              - type: object
                properties:
                  type:
                    const: borrow
                  apy:
                    type: number
                  token:
                    type: object
                    properties:
                      address:
                        type: string
                      symbol:
                        type: string
                      decimals:
                        type: number
                      icon:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - address
                      - symbol
                      - decimals
                      - icon
                  marketAction:
                    type: string
                required:
                  - type
                  - apy
                  - token
                  - marketAction
                title: Borrow Reward
                description: Reward for borrowing
        additionalData:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        actions:
          type: object
          properties:
            deposit:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            withdraw:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            withdrawComplete:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            claimRewards:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
      required:
        - id
        - type
        - productName
        - provider
        - token
        - depositApy
        - baseDepositApy
        - actions
    PerpetualMarket:
      type: object
      properties:
        id:
          type: string
        type:
          const: perpetual
        productName:
          type: string
        provider:
          type: object
          properties:
            id:
              enum:
                - kamino
                - lulo
                - marginfi
                - jupiter
                - defituna
                - carrot
                - dflow
            name:
              type: string
            icon:
              type: string
          required:
            - id
            - name
            - icon
        tokenA:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        tokenB:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        websiteUrl:
          type: string
          format: uri
        liquidity:
          type: object
          properties:
            longUsd:
              type: number
            shortUsd:
              type: number
          required:
            - longUsd
            - shortUsd
        maxLeverage:
          type: number
        additionalData:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        actions:
          type: object
          properties:
            setup:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            openPosition:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            closePosition:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
      required:
        - id
        - type
        - productName
        - provider
        - tokenA
        - tokenB
        - liquidity
        - maxLeverage
        - actions
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-dialect-client-key
      in: header
      description: Client key for the Markets API
      x-default: pk_demo

````