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

# List pending trades

> Returns pending trades awaiting approval for a portfolio, with current prices, net change, and auto-execute status.

Operation ID: get__portfolios_id_pending_trades.



## OpenAPI

````yaml /openapi/itoflow-public.openapi.json get /portfolios/{id}/pending-trades
openapi: 3.1.0
info:
  description: >-
    All Itoflow APIs are experimental and may change without notice. Read-only
    operations marked interactive can be tried from the documentation; the
    others are reference-only.
  title: Itoflow Developer API
  version: 1.0.0
servers:
  - description: Itoflow API
    url: https://api.itoflow.ai
security: []
tags:
  - name: Account
  - name: Billing
  - name: Brokers
  - name: Chat
  - name: Connected MCP servers
  - name: GitHub
  - name: Market data
  - name: Monitors
  - name: Notifications
  - name: Portfolios
  - name: Risk runs
  - name: Sharing and data
  - name: Strategies
paths:
  /portfolios/{id}/pending-trades:
    get:
      tags:
        - Portfolios
      summary: List pending trades
      description: >-
        Returns pending trades awaiting approval for a portfolio, with current
        prices, net change, and auto-execute status.


        Operation ID: get__portfolios_id_pending_trades.
      operationId: get__portfolios_id_pending_trades
      parameters:
        - description: Resource UUID
          in: path
          name: id
          required: true
          schema:
            description: Resource UUID
            example: 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingTradesResponse'
          description: Pending trades list
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid portfolio ID
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Ownership required
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Portfolio not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Server error
      security:
        - bearerAuth: []
components:
  schemas:
    PendingTradesResponse:
      properties:
        currentPrices:
          additionalProperties:
            type: string
          type: object
        metadata:
          $ref: '#/components/schemas/PendingTradesMetadata'
        trades:
          items:
            $ref: '#/components/schemas/PendingTradeItem'
          type: array
      required:
        - trades
        - metadata
        - currentPrices
      type: object
    Error:
      properties:
        available:
          description: Optional available amount or value
          type: string
        billing_action:
          $ref: '#/components/schemas/BillingAction'
        code:
          description: Machine-readable error code
          type: string
        currentVersion:
          description: Current server-side version, when relevant
          type: number
        details:
          description: Optional structured error details
        error:
          description: Error type or code
          type: string
        expectedVersion:
          description: Client-provided expected version, when relevant
          type: number
        message:
          description: Human-readable error message
          type: string
        requested:
          description: Optional requested amount or value
          type: string
        usage:
          description: Optional usage metadata for limit errors
      required:
        - error
      type: object
    PendingTradesMetadata:
      properties:
        approvalPreparationState:
          type: string
        approvalProposal:
          $ref: '#/components/schemas/ApprovalProposal'
        approvalSetStale:
          type: boolean
        autoExecute:
          type: boolean
        awaitingApprovalCount:
          type: integer
        brokerConnectionStatus:
          $ref: '#/components/schemas/BrokerConnectionStatus'
        buyCount:
          type: integer
        count:
          type: integer
        exchanges:
          items:
            type: string
          type: array
        executingCount:
          type: integer
        executionMode:
          description: paper | live
          type: string
        latestDecisionId:
          format: uuid
          type:
            - string
            - 'null'
        liveActionability:
          properties:
            approvalPreparationState:
              type: string
            approvalSetStale:
              type: boolean
            approvalSetVersion:
              type:
                - string
                - 'null'
            blockingReason:
              type:
                - string
                - 'null'
            blockingReasonCode:
              type:
                - string
                - 'null'
            canApprove:
              type: boolean
            canCancelBrokerBacked:
              type: boolean
            canCancelLocal:
              type: boolean
            canPrepareApproval:
              type: boolean
            canReconcile:
              type: boolean
            derivedFrom:
              properties:
                approval:
                  properties:
                    approvalSetVersion:
                      type:
                        - string
                        - 'null'
                    latestDecisionId:
                      format: uuid
                      type:
                        - string
                        - 'null'
                    stale:
                      type: boolean
                    state:
                      type: string
                  required:
                    - state
                    - latestDecisionId
                    - approvalSetVersion
                    - stale
                  type: object
                brokerFamily:
                  properties:
                    defaultOrderFamily:
                      type: string
                    requiresReconnectSync:
                      type: boolean
                    supportsSessionExpiryUx:
                      type: boolean
                  required:
                    - requiresReconnectSync
                    - supportsSessionExpiryUx
                    - defaultOrderFamily
                  type: object
                brokerType:
                  type:
                    - string
                    - 'null'
                connection:
                  properties:
                    isActive:
                      type:
                        - boolean
                        - 'null'
                    missingPermissions:
                      items:
                        type: string
                      type: array
                    rawSyncStatus:
                      type: string
                    sessionExpired:
                      type: boolean
                  required:
                    - rawSyncStatus
                    - isActive
                    - sessionExpired
                    - missingPermissions
                  type: object
                portfolio:
                  properties:
                    pendingAgeMs:
                      type:
                        - number
                        - 'null'
                    rawSyncStatus:
                      type:
                        - string
                        - 'null'
                    reconcileInFlight:
                      type: boolean
                  required:
                    - rawSyncStatus
                    - reconcileInFlight
                    - pendingAgeMs
                  type: object
                trade:
                  properties:
                    ageMs:
                      type:
                        - number
                        - 'null'
                    brokerOrderIdPresent:
                      type: boolean
                    executionAttemptCount:
                      type: integer
                    hasExecutionAttempt:
                      type: boolean
                    orderType:
                      type:
                        - string
                        - 'null'
                    rawStatus:
                      enum:
                        - awaiting_approval
                        - pending
                        - executing
                        - executed
                        - cancel_requested
                        - cancelled
                        - failed
                        - superseded
                        - state_unknown
                        - null
                      type:
                        - string
                        - 'null'
                    retryBudgetExhausted:
                      type: boolean
                  required:
                    - rawStatus
                    - orderType
                    - brokerOrderIdPresent
                    - hasExecutionAttempt
                    - executionAttemptCount
                    - retryBudgetExhausted
                    - ageMs
                  type: object
              required:
                - brokerType
                - brokerFamily
                - connection
                - portfolio
                - approval
                - trade
              type: object
            effectiveConnectionState:
              type: string
            effectivePortfolioState:
              type: string
            effectiveTradeLogicalState:
              type: string
            illegalCombinationSignal:
              type:
                - string
                - 'null'
            latestDecisionId:
              format: uuid
              type:
                - string
                - 'null'
            recommendedAction:
              type: string
            reconciling:
              type: boolean
          required:
            - canApprove
            - canPrepareApproval
            - canCancelLocal
            - canCancelBrokerBacked
            - canReconcile
            - reconciling
            - approvalPreparationState
            - approvalSetVersion
            - latestDecisionId
            - approvalSetStale
            - blockingReasonCode
            - blockingReason
            - recommendedAction
            - effectiveConnectionState
            - effectivePortfolioState
            - effectiveTradeLogicalState
            - illegalCombinationSignal
            - derivedFrom
          type:
            - object
            - 'null'
        netChange:
          description: Net notional change (display value)
          type: number
        reconciliationRequiredCount:
          type: integer
        reconciling:
          type: boolean
        sellCount:
          type: integer
        stateUnknownCount:
          type: integer
        totalBuyAmount:
          type: number
        totalSellAmount:
          type: number
      required:
        - count
        - netChange
        - exchanges
        - autoExecute
        - awaitingApprovalCount
        - buyCount
        - sellCount
        - totalBuyAmount
        - totalSellAmount
        - executionMode
        - executingCount
        - stateUnknownCount
        - reconciliationRequiredCount
        - brokerConnectionStatus
        - reconciling
        - liveActionability
      type: object
    PendingTradeItem:
      properties:
        action:
          type: string
        actionability:
          properties:
            approvalPreparationState:
              type: string
            approvalSetStale:
              type: boolean
            approvalSetVersion:
              type:
                - string
                - 'null'
            blockingReason:
              type:
                - string
                - 'null'
            blockingReasonCode:
              type:
                - string
                - 'null'
            canApprove:
              type: boolean
            canCancelBrokerBacked:
              type: boolean
            canCancelLocal:
              type: boolean
            canPrepareApproval:
              type: boolean
            canReconcile:
              type: boolean
            derivedFrom:
              properties:
                approval:
                  properties:
                    approvalSetVersion:
                      type:
                        - string
                        - 'null'
                    latestDecisionId:
                      format: uuid
                      type:
                        - string
                        - 'null'
                    stale:
                      type: boolean
                    state:
                      type: string
                  required:
                    - state
                    - latestDecisionId
                    - approvalSetVersion
                    - stale
                  type: object
                brokerFamily:
                  properties:
                    defaultOrderFamily:
                      type: string
                    requiresReconnectSync:
                      type: boolean
                    supportsSessionExpiryUx:
                      type: boolean
                  required:
                    - requiresReconnectSync
                    - supportsSessionExpiryUx
                    - defaultOrderFamily
                  type: object
                brokerType:
                  type:
                    - string
                    - 'null'
                connection:
                  properties:
                    isActive:
                      type:
                        - boolean
                        - 'null'
                    missingPermissions:
                      items:
                        type: string
                      type: array
                    rawSyncStatus:
                      type: string
                    sessionExpired:
                      type: boolean
                  required:
                    - rawSyncStatus
                    - isActive
                    - sessionExpired
                    - missingPermissions
                  type: object
                portfolio:
                  properties:
                    pendingAgeMs:
                      type:
                        - number
                        - 'null'
                    rawSyncStatus:
                      type:
                        - string
                        - 'null'
                    reconcileInFlight:
                      type: boolean
                  required:
                    - rawSyncStatus
                    - reconcileInFlight
                    - pendingAgeMs
                  type: object
                trade:
                  properties:
                    ageMs:
                      type:
                        - number
                        - 'null'
                    brokerOrderIdPresent:
                      type: boolean
                    executionAttemptCount:
                      type: integer
                    hasExecutionAttempt:
                      type: boolean
                    orderType:
                      type:
                        - string
                        - 'null'
                    rawStatus:
                      enum:
                        - awaiting_approval
                        - pending
                        - executing
                        - executed
                        - cancel_requested
                        - cancelled
                        - failed
                        - superseded
                        - state_unknown
                        - null
                      type:
                        - string
                        - 'null'
                    retryBudgetExhausted:
                      type: boolean
                  required:
                    - rawStatus
                    - orderType
                    - brokerOrderIdPresent
                    - hasExecutionAttempt
                    - executionAttemptCount
                    - retryBudgetExhausted
                    - ageMs
                  type: object
              required:
                - brokerType
                - brokerFamily
                - connection
                - portfolio
                - approval
                - trade
              type: object
            effectiveConnectionState:
              type: string
            effectivePortfolioState:
              type: string
            effectiveTradeLogicalState:
              type: string
            illegalCombinationSignal:
              type:
                - string
                - 'null'
            latestDecisionId:
              format: uuid
              type:
                - string
                - 'null'
            recommendedAction:
              type: string
            reconciling:
              type: boolean
          required:
            - canApprove
            - canPrepareApproval
            - canCancelLocal
            - canCancelBrokerBacked
            - canReconcile
            - reconciling
            - approvalPreparationState
            - approvalSetVersion
            - latestDecisionId
            - approvalSetStale
            - blockingReasonCode
            - blockingReason
            - recommendedAction
            - effectiveConnectionState
            - effectivePortfolioState
            - effectiveTradeLogicalState
            - illegalCombinationSignal
            - derivedFrom
          type:
            - object
            - 'null'
        actionRequired:
          type: boolean
        brokerActionRequired:
          $ref: '#/components/schemas/BrokerUserActionNotice'
        brokerDetailState:
          type:
            - string
            - 'null'
        brokerExecutionId:
          type:
            - string
            - 'null'
        canonicalStatus:
          enum:
            - awaiting_approval
            - pending
            - executing
            - executed
            - cancel_requested
            - cancelled
            - failed
            - superseded
            - state_unknown
          type: string
        companyName:
          type:
            - string
            - 'null'
        createdAt:
          type: string
        decisionId:
          format: uuid
          type:
            - string
            - 'null'
        decisionPrice:
          type:
            - string
            - 'null'
        detailLabel:
          type:
            - string
            - 'null'
        errorMessage:
          type:
            - string
            - 'null'
        executionMode:
          type: string
        filledQuantity:
          type:
            - string
            - 'null'
        id:
          format: uuid
          type: string
        intendedNotional:
          type:
            - string
            - 'null'
        limitPrice:
          type:
            - string
            - 'null'
        orderFamily:
          type:
            - string
            - 'null'
        portfolioId:
          format: uuid
          type: string
        restingLocation:
          type:
            - string
            - 'null'
        shortLabel:
          type: string
        status:
          enum:
            - awaiting_approval
            - pending
            - executing
            - executed
            - cancel_requested
            - cancelled
            - failed
            - superseded
            - state_unknown
          type: string
        statusAnimate:
          type: boolean
        statusLabel:
          type: string
        statusTone:
          type: string
        symbol:
          type: string
        triggerPrice:
          type:
            - string
            - 'null'
        updatedAt:
          type:
            - string
            - 'null'
      required:
        - canonicalStatus
        - statusLabel
        - shortLabel
        - statusTone
        - detailLabel
        - orderFamily
        - restingLocation
        - brokerDetailState
        - brokerExecutionId
        - filledQuantity
        - actionRequired
        - statusAnimate
        - id
        - portfolioId
        - executionMode
        - symbol
        - action
        - status
        - intendedNotional
        - decisionPrice
        - decisionId
        - createdAt
        - updatedAt
        - companyName
        - triggerPrice
        - limitPrice
        - errorMessage
        - actionability
      type: object
    BillingAction:
      description: Action that resolves a billing-related rejection
      properties:
        href:
          type: string
        kind:
          enum:
            - upgrade
            - payment_method
            - spending_cap
            - billing
          type: string
        label:
          type: string
      required:
        - href
        - label
        - kind
      type: object
    ApprovalProposal:
      properties:
        blockingReasonCode:
          type:
            - string
            - 'null'
        decisionId:
          format: uuid
          type:
            - string
            - 'null'
        hash:
          type: string
        id:
          format: uuid
          type: string
        message:
          type: string
        reviewRequired:
          type: boolean
        state:
          enum:
            - ready
            - proposal_changed
            - preparing
            - verification_delayed
            - reconnect_required
            - no_longer_applicable
          type: string
      required:
        - id
        - decisionId
        - hash
        - state
        - reviewRequired
        - blockingReasonCode
        - message
      type:
        - object
        - 'null'
    BrokerConnectionStatus:
      properties:
        actionRequired:
          type: boolean
        actionRequiredReason:
          enum:
            - inactive
            - session_expired
            - sync_invalid
            - sync_error
            - null
          type:
            - string
            - 'null'
        brokerType:
          type: string
        connectionId:
          type: string
        isActive:
          type: boolean
        sessionExpired:
          type: boolean
        sessionExpiresAt:
          type:
            - string
            - 'null'
        syncStatus:
          type: string
      required:
        - connectionId
        - brokerType
        - isActive
        - sessionExpired
        - sessionExpiresAt
        - syncStatus
        - actionRequired
        - actionRequiredReason
      type:
        - object
        - 'null'
    BrokerUserActionNotice:
      properties:
        actionLabel:
          type: string
        actionUrl:
          type:
            - string
            - 'null'
        brokerType:
          type: string
        code:
          enum:
            - robinhood_investor_profile_required
            - robinhood_insufficient_buying_power
          type: string
        description:
          type: string
        severity:
          enum:
            - blocking
            - warning
            - info
          type: string
        title:
          type: string
      required:
        - code
        - brokerType
        - severity
        - title
        - description
        - actionLabel
        - actionUrl
      type:
        - object
        - 'null'
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Itoflow access token issued for the Itoflow API.
      scheme: bearer
      type: http

````

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