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

# list_orders

> List Alpaca orders for the configured account (optionally filtered).

## alpaca\_list\_orders

```python
tools = trading.alpaca(
    api_key=os.environ["ALPACA_KEY"],
    api_secret=os.environ["ALPACA_SECRET"],
    model="openai",
    paper=True,
    minimal=True,
    include=["alpaca_list_orders"],
)
```

**Options**

* `include` / `exclude`: filter which tools are exposed (use full names like `alpaca_list_orders`).
* `minimal`: omit `provider` and `provider_fields` when `True`.
* `paper`: use Alpaca paper trading instead of live trading.

**Request body (optional)**

* `status`: filter orders (commonly `open`, `closed`, `all`).
* `limit`: maximum number of orders to return.


## OpenAPI

````yaml api-reference/openapi.json get /tools/alpaca/list_orders
openapi: 3.1.0
info:
  title: OpenTools Trading Tools
  version: 0.1.0
  description: >-
    Reference for OpenTools trading tool calls. These are SDK tools, documented
    as virtual endpoints for clarity.
servers: []
security: []
tags:
  - name: Alpaca
    description: >-
      Read-only account + assets + clock + orders + portfolio history +
      positions.
  - name: Coinbase
    description: >-
      Accounts + portfolios + portfolio breakdown + positions (derived) +
      brokerage products + orders (if available).
paths:
  /tools/alpaca/list_orders:
    get:
      tags:
        - Alpaca
      summary: list_orders
      description: List Alpaca orders for the configured account (optionally filtered).
      operationId: alpaca_list_orders
      requestBody:
        required: false
        description: This is a request to obtain information. Your API keys are required.
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                status:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Order status filter. Common values: 'open', 'closed', 'all'.
                    Provider-dependent.
                limit:
                  type:
                    - integer
                    - 'null'
                  minimum: 1
                  maximum: 500
                  description: Maximum number of orders to return.
            example:
              status: all
              limit: 5
      responses:
        '200':
          description: Orders (OpenTools trading schema).
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties: false
                  description: ''
                  properties:
                    provider:
                      type:
                        - string
                        - 'null'
                      description: Trading provider identifier. Omitted when minimal=True.
                    id:
                      type:
                        - string
                        - 'null'
                      description: Provider order ID.
                    client_order_id:
                      type:
                        - string
                        - 'null'
                      description: Client-supplied order ID when supported.
                    symbol:
                      type:
                        - string
                        - 'null'
                      description: Instrument symbol (e.g. 'AAPL', 'BTC/USD').
                    side:
                      type:
                        - string
                        - 'null'
                      enum:
                        - buy
                        - sell
                      description: Order side.
                    type:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Order type (e.g. market, limit, stop, stop_limit).
                        Provider-dependent.
                    time_in_force:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Time in force (e.g. day, gtc, ioc, fok).
                        Provider-dependent.
                    status:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Order status as reported by the provider (e.g. accepted,
                        filled, canceled).
                    qty:
                      type:
                        - string
                        - 'null'
                      description: Requested quantity. String to preserve exact precision.
                    notional:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Requested notional amount. String to preserve exact
                        precision.
                    filled_qty:
                      type:
                        - string
                        - 'null'
                      description: Filled quantity. String to preserve exact precision.
                    filled_avg_price:
                      type:
                        - string
                        - 'null'
                      description: Average fill price. String to preserve exact precision.
                    limit_price:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Limit price when applicable. String to preserve exact
                        precision.
                    stop_price:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Stop price when applicable. String to preserve exact
                        precision.
                    submitted_at:
                      type:
                        - string
                        - 'null'
                      format: date-time
                      description: Submitted timestamp.
                    filled_at:
                      type:
                        - string
                        - 'null'
                      format: date-time
                      description: Filled timestamp when applicable.
                    created_at:
                      type:
                        - string
                        - 'null'
                      format: date-time
                      description: Created timestamp.
                    updated_at:
                      type:
                        - string
                        - 'null'
                      format: date-time
                      description: Last update timestamp.
                    provider_fields:
                      type: object
                      additionalProperties: true
                      description: Provider-specific fields. Omitted when minimal=True.
                  examples:
                    - provider: <string>
                      id: <string>
                      client_order_id: <string>
                      symbol: <string>
                      side: buy
                      type: <string>
                      time_in_force: <string>
                      status: <string>
                      qty: <string>
                      notional: <string>
                      filled_qty: <string>
                      filled_avg_price: <string>
                      limit_price: <string>
                      stop_price: <string>
                      submitted_at: '2023-11-07T05:31:56Z'
                      filled_at: '2023-11-07T05:31:56Z'
                      created_at: '2023-11-07T05:31:56Z'
                      updated_at: '2023-11-07T05:31:56Z'
                      provider_fields: {}
        '401':
          description: Unauthorized (missing/invalid credentials).
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  message:
                    type: string
                  domain:
                    type: string
                  provider:
                    type: string
                  details: {}
                required:
                  - message
        '429':
          description: Rate limited by provider or transport.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  message:
                    type: string
                  domain:
                    type: string
                  provider:
                    type: string
                  details: {}
                required:
                  - message
      x-codeSamples:
        - lang: python
          label: Python
          source: |
            import os
            from opentools import trading

            tools = trading.alpaca(
                api_key=os.environ["ALPACA_KEY"],
                api_secret=os.environ["ALPACA_SECRET"],
                model="openai",
                paper=True,
                minimal=True,
                include=["alpaca_list_orders"],
            )

````