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

# Get order by ID

> Returns a single order by its document ID.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/orders/{id}
openapi: 3.1.0
info:
  title: Carbon Copy API
  version: 2.0.0
  description: >-
    Programmatic access to Carbon Copy's Polymarket copy-trading platform.
    Follow traders, manage your portfolio, and automate your prediction market
    strategy.
  contact:
    name: Carbon Copy Support
    email: support@carboncopy.inc
    url: https://carboncopy.inc
servers:
  - url: https://carboncopy.inc
    description: Production
security: []
tags:
  - name: Health
    description: Service health and status.
  - name: Portfolio
    description: Portfolio summary, positions, trade history, and P&L.
  - name: Follow Management
    description: >-
      Follow, configure, and manage the traders you copy. All routes live under
      `/portfolio/traders`.
  - name: Trader Discovery
    description: Search and filter traders on the platform. Routes under `/traders`.
  - name: Orders
    description: Inspect orders placed by your copy-trading bot.
  - name: Markets
    description: Market data — prices and token info.
  - name: Account
    description: Your Carbon Copy account information.
paths:
  /api/v1/orders/{id}:
    get:
      tags:
        - Orders
      summary: Get order by ID
      description: Returns a single order by its document ID.
      operationId: getOrder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            example: k17xyz789
      responses:
        '200':
          description: Order details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Order:
      type: object
      required:
        - id
        - marketId
        - side
        - amount
        - status
        - createdAt
      properties:
        id:
          type: string
          example: k17xyz789
        marketId:
          type: string
        marketQuestion:
          type:
            - string
            - 'null'
        side:
          type: string
          enum:
            - 'YES'
            - 'NO'
        amount:
          type: number
          example: 50
        filledAmount:
          type:
            - number
            - 'null'
          example: 50
        price:
          type:
            - number
            - 'null'
          example: 0.62
        status:
          type: string
          enum:
            - filled
            - pending
            - cancelled
            - failed
        createdAt:
          type: integer
          example: 1741550000000
        filledAt:
          type:
            - integer
            - 'null'
        errorMessage:
          type:
            - string
            - 'null'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - bad_request
                - unauthorized
                - forbidden
                - not_found
                - method_not_allowed
                - conflict
                - quota_exceeded
                - rate_limited
                - internal_error
            message:
              type: string
              description: Human-readable description of the error.
  responses:
    Unauthorized:
      description: Missing or invalid authentication credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: Invalid or missing API key.
    Forbidden:
      description: Authenticated but insufficient permissions (wrong scope).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: forbidden
              message: This key does not have the required scope.
    NotFound:
      description: The requested resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: Resource not found.
    RateLimited:
      description: Too many requests. Back off and retry.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: rate_limited
              message: Rate limit exceeded. Retry after 30 seconds.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        API key in the format `cc_<64 hex characters>`. Obtain from the
        Dashboard under Settings → API Keys.

````