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

# Place order



## OpenAPI

````yaml /stocks/api-reference/openapi.json post /orders
openapi: 3.1.0
info:
  contact:
    email: support@daya.co
    name: API Support
  description: >-
    Public developer API for the Stocks by Daya product. X-API-Key
    authenticated. Market data, portfolio, balances, activity, order placement,
    and fiat withdrawals. All responses use the standard envelope: { success,
    message?, data?, error?, timestamp }.
  title: Daya Stocks Public API
  version: 1.0.0
servers:
  - url: https://api.daya.co/stocks/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /orders:
    post:
      tags:
        - stocks-trading
      summary: Place order
      operationId: postOrders
      parameters:
        - description: Stable key for this logical operation; reuse it for every retry
          in: header
          name: Idempotency-Key
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_publicapi_v1.PublicOrderRequest'
        description: quote_id
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: >-
                      #/components/schemas/github_com_dayacoins_daya-stocks-service_pkg_response.Envelope
                  - properties:
                      data:
                        $ref: '#/components/schemas/internal_publicapi_v1.PublicOrder'
                    type: object
          description: Pending order
        '400':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_dayacoins_daya-stocks-service_pkg_response.Envelope
          description: Invalid request / missing Idempotency-Key
        '401':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_dayacoins_daya-stocks-service_pkg_response.Envelope
          description: Missing or invalid API key
components:
  schemas:
    internal_publicapi_v1.PublicOrderRequest:
      properties:
        quote_id:
          example: eyJhbGciOiJIUzI1NiJ9.eyJzeW1ib2wiOiJBQVBMIn0
          type: string
      type: object
      required:
        - quote_id
    github_com_dayacoins_daya-stocks-service_pkg_response.Envelope:
      properties:
        data: {}
        error:
          $ref: >-
            #/components/schemas/github_com_dayacoins_daya-stocks-service_pkg_response.ErrorData
        message:
          description: Message is an optional banner/toast string.
          type: string
        success:
          type: boolean
        timestamp:
          type: string
      type: object
    internal_publicapi_v1.PublicOrder:
      properties:
        created_at:
          example: '2026-01-15T10:30:00Z'
          type: string
        fee_usd:
          example: '1.00'
          type: string
        id:
          example: a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
          type: string
        notional_usd:
          example: '100.00'
          type: string
        quantity:
          example: '0.5277'
          type: string
        side:
          enum:
            - buy
            - sell
          example: buy
          type: string
        status:
          enum:
            - pending
            - filled
            - failed
          example: filled
          type: string
        symbol:
          example: AAPL
          type: string
      type: object
    github_com_dayacoins_daya-stocks-service_pkg_response.ErrorData:
      properties:
        code:
          type: string
        details: {}
        fields:
          additionalProperties:
            type: string
          type: object
        message:
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: >-
        Your Daya API key, sent in the X-API-Key header. Issue and scope keys in
        the Daya dashboard.
      in: header
      name: X-API-Key
      type: apiKey

````