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

# Get Orphaned Positions

> List terminated executors that may still own an on-chain position.

Covers three orphan classes:
- Involuntary holds: close_type POSITION_HOLD with hold_reason set (an LP close
  that exhausted its retries): the position is live on-chain with no automated
  owner.
- Legacy FAILED records whose final state still reported a position_address
  (force-stop stragglers, records persisted by older executors).
- Executors terminated by SYSTEM_CLEANUP after an API restart: their on-chain
  state was never persisted, so they need external reconciliation.

This is a DB-side listing. Before recovering, cross-check candidates against
on-chain reality via the gateway positions-owned endpoints
(/trading/clmm/positions-owned, /trading/amm/positions-owned).



## OpenAPI

````yaml /api-reference/openapi.json get /executors/positions/orphaned
openapi: 3.1.0
info:
  title: Hummingbot API
  description: API for managing Hummingbot trading instances
  version: 1.0.1
servers:
  - url: http://localhost:8000
    description: Local development server
security: []
paths:
  /executors/positions/orphaned:
    get:
      tags:
        - Executors
      summary: Get Orphaned Positions
      description: >-
        List terminated executors that may still own an on-chain position.


        Covers three orphan classes:

        - Involuntary holds: close_type POSITION_HOLD with hold_reason set (an
        LP close
          that exhausted its retries): the position is live on-chain with no automated
          owner.
        - Legacy FAILED records whose final state still reported a
        position_address
          (force-stop stragglers, records persisted by older executors).
        - Executors terminated by SYSTEM_CLEANUP after an API restart: their
        on-chain
          state was never persisted, so they need external reconciliation.

        This is a DB-side listing. Before recovering, cross-check candidates
        against

        on-chain reality via the gateway positions-owned endpoints

        (/trading/clmm/positions-owned, /trading/amm/positions-owned).
      operationId: get_orphaned_positions_executors_positions_orphaned_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrphanedPositionsResponse'
      security:
        - HTTPBasic: []
components:
  schemas:
    OrphanedPositionsResponse:
      properties:
        count:
          type: integer
          title: Count
          description: Number of orphan candidates
        orphans:
          items:
            $ref: '#/components/schemas/OrphanedPositionRecord'
          type: array
          title: Orphans
          description: Orphan candidate records
      type: object
      required:
        - count
        - orphans
      title: OrphanedPositionsResponse
      description: Terminated executors that may have stranded on-chain positions.
    OrphanedPositionRecord:
      properties:
        executor_id:
          type: string
          title: Executor Id
          description: Executor identifier
        executor_type:
          type: string
          title: Executor Type
          description: Executor type (e.g. lp_executor)
        account_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Name
          description: Account name
        connector_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Connector Name
          description: >-
            Connector name. For lp_executor this is the network id (e.g.
            'solana-mainnet-beta'), not the DEX - see lp_provider for the DEX
        trading_pair:
          anyOf:
            - type: string
            - type: 'null'
          title: Trading Pair
          description: Trading pair
        lp_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Lp Provider
          description: >-
            DEX connector that holds the position (e.g. 'orca/clmm'), read from
            the executor config. Pass its base name to the CLMM close endpoint
        pool_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Pool Address
          description: >-
            Pool the position was opened against, read from the executor config.
            Required to close a position that was never recorded in the API
            database (LP-executor positions never are)
        controller_id:
          type: string
          title: Controller Id
          description: Controller/agent grouping label
          default: main
        close_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Close Type
          description: POSITION_HOLD (involuntary hold), FAILED, or SYSTEM_CLEANUP
        closed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Closed At
          description: Termination timestamp (ISO format)
        position_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Position Address
          description: >-
            On-chain position address (None for restart cleanups, which never
            persisted state)
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: Executor state at termination (e.g. FAILED, CLOSING)
        hold_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Hold Reason
          description: >-
            Why the hold was involuntary (e.g. close_retries_exhausted); None
            for legacy FAILED/SYSTEM_CLEANUP records
        needs_onchain_reconciliation:
          type: boolean
          title: Needs Onchain Reconciliation
          description: >-
            True when the position address is unknown and on-chain state must be
            checked externally
          default: false
      type: object
      required:
        - executor_id
        - executor_type
      title: OrphanedPositionRecord
      description: A terminated executor that may still own an on-chain position.
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic

````