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

# Read full on-chain account state (balances, trustlines, offers, signers).



## OpenAPI

````yaml /api-reference/openapi.json get /{network}/account/{address}
openapi: 3.0.0
info:
  title: LumenWipe API
  description: Programmatic close-out of Stellar accounts.
  version: 0.1.0
  contact: {}
servers:
  - url: https://api.lumenwipe.com
security: []
tags:
  - name: close
    description: Build and submit an account close-out
  - name: account
    description: Read account state and conversion paths
  - name: mediator
    description: Exchange-destination forwarding
  - name: health
    description: Service health
  - name: service
    description: Service index
  - name: admin
    description: Operator-only self-serve API key management
paths:
  /{network}/account/{address}:
    get:
      tags:
        - account
      summary: >-
        Read full on-chain account state (balances, trustlines, offers,
        signers).
      operationId: AccountController_account
      parameters:
        - name: network
          required: true
          in: path
          schema:
            enum:
              - testnet
              - mainnet
            type: string
        - name: address
          required: true
          in: path
          description: Stellar account (G...).
          schema:
            type: string
        - name: tokens
          required: false
          in: query
          description: >-
            Soroban token contracts (C..., comma-separated, at most 20) to check
            for a balance besides what discovery finds.
          schema:
            type: string
      responses:
        '200':
          description: Aggregated account state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountStateDto'
        '400':
          description: Invalid network or address.
        '401':
          description: Missing or invalid API key.
        '404':
          description: Account not found.
        '429':
          description: Rate limit exceeded for this key.
      security:
        - api-key: []
components:
  schemas:
    AccountStateDto:
      type: object
      properties:
        address:
          type: string
        network:
          type: string
          enum:
            - mainnet
            - testnet
        sequence:
          type: string
        nativeBalanceLumens:
          type: string
        dataEntries:
          type: array
          items:
            $ref: '#/components/schemas/DataEntryDto'
        signers:
          type: array
          items:
            $ref: '#/components/schemas/AccountSignerDto'
        thresholds:
          $ref: '#/components/schemas/AccountThresholdsDto'
        numSubEntries:
          type: number
        numSponsoring:
          type: number
        sponsoredEntries:
          type: array
          description: >-
            Ledger entries this account currently sponsors, on another account
            or itself.
          items:
            oneOf:
              - $ref: '#/components/schemas/SponsoredAccountDto'
              - $ref: '#/components/schemas/SponsoredTrustlineDto'
              - $ref: '#/components/schemas/SponsoredOfferDto'
              - $ref: '#/components/schemas/SponsoredDataEntryDto'
              - $ref: '#/components/schemas/SponsoredSignerDto'
              - $ref: '#/components/schemas/SponsoredClaimableBalanceDto'
            discriminator:
              propertyName: kind
              mapping:
                account: '#/components/schemas/SponsoredAccountDto'
                trustline: '#/components/schemas/SponsoredTrustlineDto'
                offer: '#/components/schemas/SponsoredOfferDto'
                data_entry: '#/components/schemas/SponsoredDataEntryDto'
                signer: '#/components/schemas/SponsoredSignerDto'
                claimable_balance: '#/components/schemas/SponsoredClaimableBalanceDto'
        sponsorshipEnumerationIncomplete:
          type: boolean
          description: True when sponsoredEntries could not be enumerated completely.
        sponsoredBy:
          type: string
          nullable: true
        authImmutable:
          type: boolean
          description: AUTH_IMMUTABLE is set - ACCOUNT_MERGE is permanently blocked.
        trustlines:
          type: array
          items:
            $ref: '#/components/schemas/TrustlineDto'
        openOffers:
          type: array
          items:
            $ref: '#/components/schemas/OpenOfferDto'
        poolShares:
          type: array
          items:
            $ref: '#/components/schemas/PoolShareEntryDto'
        claimableBalances:
          type: array
          items:
            $ref: '#/components/schemas/ClaimableBalanceDto'
        subEntryMismatch:
          type: boolean
          description: >-
            True when the enumerated subentry count is lower than numSubEntries
            from the ledger.
        defiPositions:
          $ref: '#/components/schemas/DefiPositionsResultDto'
        defiPositionsWarnings:
          type: array
          items:
            $ref: '#/components/schemas/PlanBlockerDto'
        sorobanTokens:
          description: >-
            Absent on account reads produced before this field existed - treat
            absence as "nothing known", never "nothing held".
          allOf:
            - $ref: '#/components/schemas/SorobanTokensResultDto'
      required:
        - address
        - network
        - sequence
        - nativeBalanceLumens
        - dataEntries
        - signers
        - thresholds
        - numSubEntries
        - numSponsoring
        - sponsoredEntries
        - sponsorshipEnumerationIncomplete
        - sponsoredBy
        - authImmutable
        - trustlines
        - openOffers
        - poolShares
        - claimableBalances
        - subEntryMismatch
        - defiPositions
        - defiPositionsWarnings
    DataEntryDto:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
          description: Base64-encoded value.
      required:
        - key
        - value
    AccountSignerDto:
      type: object
      properties:
        key:
          type: string
        weight:
          type: number
        type:
          type: string
          enum:
            - ed25519_public_key
            - hash_x
            - preauth_tx
            - ed25519_signed_payload
      required:
        - key
        - weight
        - type
    AccountThresholdsDto:
      type: object
      properties:
        low:
          type: number
        med:
          type: number
        high:
          type: number
      required:
        - low
        - med
        - high
    SponsoredAccountDto:
      type: object
      properties:
        kind:
          type: string
          enum:
            - account
        owner:
          type: string
      required:
        - kind
        - owner
    SponsoredTrustlineDto:
      type: object
      properties:
        kind:
          type: string
          enum:
            - trustline
        owner:
          type: string
        asset:
          type: string
      required:
        - kind
        - owner
        - asset
    SponsoredOfferDto:
      type: object
      properties:
        kind:
          type: string
          enum:
            - offer
        owner:
          type: string
        offerId:
          type: string
      required:
        - kind
        - owner
        - offerId
    SponsoredDataEntryDto:
      type: object
      properties:
        kind:
          type: string
          enum:
            - data_entry
        owner:
          type: string
        name:
          type: string
      required:
        - kind
        - owner
        - name
    SponsoredSignerDto:
      type: object
      properties:
        kind:
          type: string
          enum:
            - signer
        owner:
          type: string
        signerKey:
          type: string
      required:
        - kind
        - owner
        - signerKey
    SponsoredClaimableBalanceDto:
      type: object
      properties:
        kind:
          type: string
          enum:
            - claimable_balance
        balanceId:
          type: string
      required:
        - kind
        - balanceId
    TrustlineDto:
      type: object
      properties:
        asset:
          type: string
          description: '"CODE:ISSUER" or "native".'
        balance:
          type: string
        limit:
          type: string
          description: >-
            Only from the Horizon-compatible reader; RPC's getAssetBalance
            doesn't expose it.
        authorized:
          type: boolean
        issuer:
          type: string
        code:
          type: string
      required:
        - asset
        - balance
        - authorized
        - issuer
        - code
    OpenOfferDto:
      type: object
      properties:
        id:
          type: string
        selling:
          type: string
          description: '"CODE:ISSUER" or "native".'
        buying:
          type: string
        amount:
          type: string
        price:
          type: string
      required:
        - id
        - selling
        - buying
        - amount
        - price
    PoolShareEntryDto:
      type: object
      properties:
        poolId:
          type: string
          description: 64-char hex, without the L prefix.
      required:
        - poolId
    ClaimableBalanceDto:
      type: object
      properties:
        id:
          type: string
          description: Full 72-char hex balance ID ("00000000" + 64-char hash).
        asset:
          type: string
          description: '"CODE:ISSUER" or "native".'
        amount:
          type: string
        claimants:
          type: array
          description: One entry per claimant, each with its own predicate.
          items:
            type: object
            properties:
              destination:
                type: string
              predicate:
                $ref: '#/components/schemas/ClaimPredicateDto'
            required:
              - destination
              - predicate
        sponsor:
          type: string
          nullable: true
      required:
        - id
        - asset
        - amount
        - claimants
        - sponsor
    DefiPositionsResultDto:
      type: object
      properties:
        address:
          type: string
        network:
          type: string
          enum:
            - mainnet
            - testnet
        positions:
          type: array
          description: >-
            Every detected position, in whichever of the 7 known shapes it
            actually is.
          items:
            oneOf:
              - $ref: '#/components/schemas/BlendSupplyPositionDto'
              - $ref: '#/components/schemas/BlendBorrowPositionDto'
              - $ref: '#/components/schemas/AquariusLpPositionDto'
              - $ref: '#/components/schemas/SoroswapLpPositionDto'
              - $ref: '#/components/schemas/PhoenixLpPositionDto'
              - $ref: '#/components/schemas/PhoenixStakePositionDto'
              - $ref: '#/components/schemas/FxdaoCdpPositionDto'
        unrecognizedPositions:
          type: array
          items:
            $ref: '#/components/schemas/UnrecognizedDefiPositionDto'
        enrichment:
          type: object
          description: Keyed by asset/contract address.
          additionalProperties: 611ce219-c147-40b8-bb29-9daf9d7dad35
        source:
          type: string
          description: >-
            OctoPos's own freshness/provenance signal ("snapshot" | "empty" |
            "cache" | "not-tracked").
        timestamp:
          type: string
          nullable: true
        queryKeys:
          $ref: '#/components/schemas/DefiQueryKeysDto'
      required:
        - address
        - network
        - positions
        - unrecognizedPositions
        - enrichment
        - source
        - timestamp
        - queryKeys
    PlanBlockerDto:
      type: object
      properties:
        message:
          type: string
          description: Plain-language explanation.
        helpUrl:
          type: string
          description: A docs link with more detail.
        code:
          type: string
          description: >-
            Distinguishes an acknowledged, non-trapping warning (e.g. a chosen
            forfeit) from a hard blocker. Absent means the generic hard-blocking
            case.
      required:
        - message
    SorobanTokensResultDto:
      type: object
      properties:
        tokens:
          type: array
          items:
            $ref: '#/components/schemas/SorobanTokenBalanceDto'
        unreadable:
          description: Candidate contracts whose balance could not be read.
          type: array
          items:
            type: string
        coverage:
          type: array
          items:
            $ref: '#/components/schemas/SorobanTokenCoverageDto'
        eventsScanned:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/EventsScannedRangeDto'
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/PlanBlockerDto'
      required:
        - tokens
        - unreadable
        - coverage
        - eventsScanned
        - warnings
    ClaimPredicateDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - unconditional
            - and
            - or
            - not
            - before_absolute_time
            - before_relative_time
        predicates:
          description: '"and"/"or" only: the combined sub-predicates.'
          type: array
          items:
            $ref: '#/components/schemas/ClaimPredicateDto'
        predicate:
          description: '"not" only: the negated sub-predicate.'
          allOf:
            - $ref: '#/components/schemas/ClaimPredicateDto'
        absBeforeEpoch:
          type: string
          description: '"before_absolute_time" only: Unix epoch seconds, as a string.'
        relBeforeSeconds:
          type: string
          description: '"before_relative_time" only: seconds after claim creation.'
        deadlineEpoch:
          type: string
          description: '"before_relative_time" only: absolute deadline this resolves to.'
      required:
        - type
    BlendSupplyPositionDto:
      type: object
      properties:
        protocol:
          type: string
          enum:
            - blend
        contractAddress:
          type: string
          description: Pool, market, or vault contract this position lives in.
        display:
          $ref: '#/components/schemas/DefiPositionDisplayDto'
        wasmHash:
          type: string
          description: wasmHash -> protocol-version registry hook (not yet populated).
        usdValue:
          type: string
          nullable: true
        positionType:
          type: string
          enum:
            - supply
        assetAddress:
          type: string
        bTokenAmount:
          type: string
        isBackstop:
          type: boolean
          description: True when this supply is also posted as backstop collateral.
      required:
        - protocol
        - contractAddress
        - usdValue
        - positionType
        - assetAddress
        - bTokenAmount
    BlendBorrowPositionDto:
      type: object
      properties:
        protocol:
          type: string
          enum:
            - blend
        contractAddress:
          type: string
          description: Pool, market, or vault contract this position lives in.
        display:
          $ref: '#/components/schemas/DefiPositionDisplayDto'
        wasmHash:
          type: string
          description: wasmHash -> protocol-version registry hook (not yet populated).
        usdValue:
          type: string
          nullable: true
        positionType:
          type: string
          enum:
            - borrow
        assetAddress:
          type: string
        dTokenAmount:
          type: string
        healthFactor:
          type: string
      required:
        - protocol
        - contractAddress
        - usdValue
        - positionType
        - assetAddress
        - dTokenAmount
    AquariusLpPositionDto:
      type: object
      properties:
        protocol:
          type: string
          enum:
            - aquarius
        contractAddress:
          type: string
          description: Pool, market, or vault contract this position lives in.
        display:
          $ref: '#/components/schemas/DefiPositionDisplayDto'
        wasmHash:
          type: string
          description: wasmHash -> protocol-version registry hook (not yet populated).
        usdValue:
          type: string
          nullable: true
        positionType:
          type: string
          enum:
            - lp
        shareAmount:
          type: string
        claimableAquaAmount:
          type: string
          description: Reported by OctoPos alongside the LP position.
        tokens:
          description: The pool's tokens in the pool's own order.
          type: array
          items:
            type: string
        shareToken:
          type: string
          description: The pool's separate LP share token contract.
        poolType:
          type: string
          enum:
            - constant_product
            - stable
            - concentrated
      required:
        - protocol
        - contractAddress
        - usdValue
        - positionType
        - shareAmount
    SoroswapLpPositionDto:
      type: object
      properties:
        protocol:
          type: string
          enum:
            - soroswap
        contractAddress:
          type: string
          description: Pool, market, or vault contract this position lives in.
        display:
          $ref: '#/components/schemas/DefiPositionDisplayDto'
        wasmHash:
          type: string
          description: wasmHash -> protocol-version registry hook (not yet populated).
        usdValue:
          type: string
          nullable: true
        positionType:
          type: string
          enum:
            - lp
        shareAmount:
          type: string
        tokens:
          description: The pair's two token contracts (token_0, token_1).
          type: array
          items:
            type: string
      required:
        - protocol
        - contractAddress
        - usdValue
        - positionType
        - shareAmount
    PhoenixLpPositionDto:
      type: object
      properties:
        protocol:
          type: string
          enum:
            - phoenix
        contractAddress:
          type: string
          description: Pool, market, or vault contract this position lives in.
        display:
          $ref: '#/components/schemas/DefiPositionDisplayDto'
        wasmHash:
          type: string
          description: wasmHash -> protocol-version registry hook (not yet populated).
        usdValue:
          type: string
          nullable: true
        positionType:
          type: string
          enum:
            - lp
        shareAmount:
          type: string
      required:
        - protocol
        - contractAddress
        - usdValue
        - positionType
        - shareAmount
    PhoenixStakePositionDto:
      type: object
      properties:
        protocol:
          type: string
          enum:
            - phoenix
        contractAddress:
          type: string
          description: Pool, market, or vault contract this position lives in.
        display:
          $ref: '#/components/schemas/DefiPositionDisplayDto'
        wasmHash:
          type: string
          description: wasmHash -> protocol-version registry hook (not yet populated).
        usdValue:
          type: string
          nullable: true
        positionType:
          type: string
          enum:
            - stake
        stakedAmount:
          type: string
        stakedAtEpoch:
          type: string
          description: Unix seconds; unbonding needs the original stake's timestamp.
      required:
        - protocol
        - contractAddress
        - usdValue
        - positionType
        - stakedAmount
        - stakedAtEpoch
    FxdaoCdpPositionDto:
      type: object
      properties:
        protocol:
          type: string
          enum:
            - fxdao
        contractAddress:
          type: string
          description: Pool, market, or vault contract this position lives in.
        display:
          $ref: '#/components/schemas/DefiPositionDisplayDto'
        wasmHash:
          type: string
          description: wasmHash -> protocol-version registry hook (not yet populated).
        usdValue:
          type: string
          nullable: true
        positionType:
          type: string
          enum:
            - cdp
        denomination:
          type: string
        collateralAmount:
          type: string
        debtAmount:
          type: string
      required:
        - protocol
        - contractAddress
        - usdValue
        - positionType
        - denomination
        - collateralAmount
        - debtAmount
    UnrecognizedDefiPositionDto:
      type: object
      properties:
        protocol:
          type: string
          enum:
            - blend
            - aquarius
            - soroswap
            - phoenix
            - fxdao
        rawType:
          type: string
          description: OctoPos's raw type tag (e.g. "SUPPLY"), kept for diagnostics.
        reason:
          type: string
          description: Why the shape didn't validate.
      required:
        - protocol
        - rawType
        - reason
    DefiQueryKeysDto:
      type: object
      properties:
        rpcEndpoints:
          type: array
          items:
            $ref: '#/components/schemas/DefiRpcEndpointDto'
        rpcPolicy:
          $ref: '#/components/schemas/DefiRpcPolicyDto'
        slices:
          type: object
          description: Keyed by protocol; only protocols with a live slice are present.
          additionalProperties: 460793da-d6c3-46fd-a54c-73fd61d6ce94
      required:
        - rpcEndpoints
        - rpcPolicy
        - slices
    SorobanTokenBalanceDto:
      type: object
      properties:
        contract:
          type: string
          description: The token contract, C...
        balance:
          type: string
          description: >-
            Base units, integer string. "0" only for a token not yet held whose
            detected exit will pay out.
        symbol:
          type: string
          nullable: true
        decimals:
          type: integer
          nullable: true
        sources:
          type: array
          items:
            type: string
            enum:
              - explorer
              - positions
              - list
              - events
              - manual
      required:
        - contract
        - balance
        - symbol
        - decimals
        - sources
    SorobanTokenCoverageDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - explorer
            - positions
            - list
            - events
            - manual
        status:
          type: string
          enum:
            - ok
            - failed
            - skipped
        detail:
          type: string
      required:
        - source
        - status
    EventsScannedRangeDto:
      type: object
      properties:
        fromLedger:
          type: number
        toLedger:
          type: number
      required:
        - fromLedger
        - toLedger
    DefiPositionDisplayDto:
      type: object
      properties:
        pool:
          type: string
          description: The pool, pair, or vault by name.
          nullable: true
        asset:
          type: string
          description: >-
            Symbol of the position's asset; for an LP position, the pair (e.g.
            "XLM/USDC").
          nullable: true
        amount:
          type: string
          description: >-
            Underlying amount in the asset's own units, decimal string - not
            shares/bTokens.
          nullable: true
        collateralAmount:
          type: string
          description: >-
            The part of `amount` posted as collateral, when the protocol
            distinguishes it.
          nullable: true
        yieldPct:
          type: string
          description: Current yield as a percentage with two decimals ("3.99").
          nullable: true
        yieldKind:
          type: string
          enum:
            - earned
            - paid
          nullable: true
        detail:
          type: string
          description: >-
            One protocol-specific closing clause, e.g. "9.95 XLM + 19.90 USDC".
            Null/absent when there is nothing to add.
          nullable: true
      required:
        - pool
        - asset
        - amount
        - collateralAmount
        - yieldPct
        - yieldKind
    DefiRpcEndpointDto:
      type: object
      properties:
        url:
          type: string
        health:
          type: string
        avgLatencyMs:
          type: number
      required:
        - url
        - health
        - avgLatencyMs
    DefiRpcPolicyDto:
      type: object
      properties:
        maxKeysPerCall:
          type: number
        recommendedConcurrency:
          type: number
        backoffOn429Ms:
          type: array
          items:
            type: number
        timeoutMs:
          type: number
      required:
        - maxKeysPerCall
        - recommendedConcurrency
        - backoffOn429Ms
        - timeoutMs
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: opaque
      type: http
      description: Integrator API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.