> ## 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.

# get_order

> Get a single Coinbase brokerage order by order_id. Returns null if the order is not found or not accessible.

## coinbase\_get\_order

```python
import os
from opentools import trading

tools = trading.coinbase(
    api_key=os.environ["COINBASE_KEY"],
    api_secret=os.environ["COINBASE_SECRET"],
    model="openai",
    minimal=True,
    include=["coinbase_get_order"],
)
```

**Request**

* Required `order_id`
* Optional `nested`

**Response**

* Returns a canonical `Order` object, or `null` if not found.

**Options**

* `include` / `exclude`: filter which tools are exposed (use full names like `coinbase_get_order`).
* `minimal`: omit `provider` and `provider_fields` when `True`.


## OpenAPI

````yaml api-reference/openapi.json get /tools/coinbase/get_order
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/coinbase/get_order:
    get:
      tags:
        - Coinbase
      summary: get_order
      description: >-
        Get a single Coinbase brokerage order by order_id. Returns null if the
        order is not found or not accessible.
      operationId: coinbase_get_order
      requestBody:
        required: true
        description: This is a request to obtain information. Your API keys are required.
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  description: The Coinbase order_id to fetch.
                nested:
                  type: boolean
                  description: Optional nested flag (kept for compatibility).
              required:
                - order_id
              additionalProperties: false
            examples:
              by_id:
                value:
                  order_id: 6a2b0d4a-aaaa-bbbb-cccc-1234567890ab
              by_id_nested:
                value:
                  order_id: 6a2b0d4a-aaaa-bbbb-cccc-1234567890ab
                  nested: true
      responses:
        '200':
          description: Order (OpenTools trading schema) or null if not found.
          content:
            application/json:
              schema:
                oneOf:
                  - 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: {}
                  - type: 'null'
        '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.coinbase(
                api_key=os.environ["COINBASE_KEY"],
                api_secret=os.environ["COINBASE_SECRET"],
                model="openai",
                minimal=True,
                include=["coinbase_get_order"],
            )

````