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

# /order

<Tip>
  Although this documentation separates operations into different channels for clarity, all messages are sent over `wss://poly.drive.markets`.

  You must ensure the `path` property in your JSON payload matches the intended operation. [Using WebSockets](/using-websockets)
</Tip>


## AsyncAPI

````yaml api-reference/asyncapi.yaml order
id: order
title: Order
description: ''
servers:
  - id: production
    protocol: wss
    host: poly.drive.markets/ws
    bindings: []
    variables: []
address: order
parameters: []
bindings: []
operations:
  - &ref_1
    id: order.publish
    title: Order.publish
    type: receive
    messages:
      - &ref_3
        id: publish.message.0
        payload:
          - name: Place Single Order
            description: >
              Create and place a single order.


              [Polymarket
              Docs](https://docs.polymarket.com/developers/CLOB/orders/create-order)
            type: object
            properties:
              - name: id
                type: string
                description: Unique request ID.
                required: false
              - name: path
                type: string
                enumValues:
                  - /order
                required: true
              - name: method
                type: string
                enumValues:
                  - POST
                required: true
              - name: headers
                type: object
                description: Required L2 Headers for Polymarket CLOB API.
                required: true
                properties:
                  - name: POLY-API-KEY
                    type: string
                    required: false
                  - name: POLY-SIGNATURE
                    type: string
                    required: false
                  - name: POLY-TIMESTAMP
                    type: string
                    required: false
                  - name: POLY-NONCE
                    type: string
                    required: false
              - name: body
                type: string
                description: Order generated by the CLOB client
                required: true
        headers: []
        jsonPayloadSchema:
          title: Place Single Order Payload
          type: object
          required:
            - path
            - method
            - headers
            - body
          properties:
            id:
              type: string
              description: Unique request ID.
              x-parser-schema-id: <anonymous-schema-1>
            path:
              type: string
              enum:
                - /order
              default: /order
              x-parser-schema-id: <anonymous-schema-2>
            method:
              type: string
              enum:
                - POST
              default: POST
              x-parser-schema-id: <anonymous-schema-3>
            headers:
              type: object
              description: Required L2 Headers for Polymarket CLOB API.
              properties:
                POLY-API-KEY:
                  type: string
                  x-parser-schema-id: <anonymous-schema-5>
                POLY-SIGNATURE:
                  type: string
                  x-parser-schema-id: <anonymous-schema-6>
                POLY-TIMESTAMP:
                  type: string
                  x-parser-schema-id: <anonymous-schema-7>
                POLY-NONCE:
                  type: string
                  x-parser-schema-id: <anonymous-schema-8>
              x-parser-schema-id: <anonymous-schema-4>
            body:
              type: string
              description: Order generated by the CLOB client
              x-parser-schema-id: <anonymous-schema-9>
          x-parser-schema-id: PlaceOrderRequest
        title: Place Single Order
        description: >
          Create and place a single order.


          [Polymarket
          Docs](https://docs.polymarket.com/developers/CLOB/orders/create-order)
        example: |-
          {
            "id": "<string>",
            "path": "<string>",
            "method": "<string>",
            "headers": {
              "POLY-API-KEY": "<string>",
              "POLY-SIGNATURE": "<string>",
              "POLY-TIMESTAMP": "<string>",
              "POLY-NONCE": "<string>"
            },
            "body": "<string>"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: publish.message.0
      - &ref_4
        id: publish.message.1
        payload:
          - name: Cancel Single Order
            description: >
              Cancel a single order by ID.


              [Polymarket
              Docs](https://docs.polymarket.com/developers/CLOB/orders/cancel-orders#cancel-an-single-order)
            type: object
            properties:
              - name: id
                type: string
                description: Unique request ID.
                required: false
              - name: path
                type: string
                enumValues:
                  - /order
                required: true
              - name: method
                type: string
                enumValues:
                  - DELETE
                required: true
              - name: headers
                type: object
                description: Required L2 Headers for Polymarket CLOB API.
                required: true
                properties:
                  - name: POLY-API-KEY
                    type: string
                    required: false
                  - name: POLY-SIGNATURE
                    type: string
                    required: false
                  - name: POLY-TIMESTAMP
                    type: string
                    required: false
                  - name: POLY-NONCE
                    type: string
                    required: false
              - name: body
                type: object
                required: true
                properties:
                  - name: orderID
                    type: string
                    description: ID of order to cancel
                    required: true
        headers: []
        jsonPayloadSchema:
          title: Cancel Single Order Payload
          type: object
          required:
            - path
            - method
            - headers
            - body
          properties:
            id:
              type: string
              description: Unique request ID.
              x-parser-schema-id: <anonymous-schema-10>
            path:
              type: string
              enum:
                - /order
              default: /order
              x-parser-schema-id: <anonymous-schema-11>
            method:
              type: string
              enum:
                - DELETE
              default: DELETE
              x-parser-schema-id: <anonymous-schema-12>
            headers:
              type: object
              description: Required L2 Headers for Polymarket CLOB API.
              properties:
                POLY-API-KEY:
                  type: string
                  x-parser-schema-id: <anonymous-schema-14>
                POLY-SIGNATURE:
                  type: string
                  x-parser-schema-id: <anonymous-schema-15>
                POLY-TIMESTAMP:
                  type: string
                  x-parser-schema-id: <anonymous-schema-16>
                POLY-NONCE:
                  type: string
                  x-parser-schema-id: <anonymous-schema-17>
              x-parser-schema-id: <anonymous-schema-13>
            body:
              type: object
              required:
                - orderID
              properties:
                orderID:
                  type: string
                  description: ID of order to cancel
                  x-parser-schema-id: <anonymous-schema-19>
              x-parser-schema-id: <anonymous-schema-18>
          x-parser-schema-id: CancelOrderRequest
        title: Cancel Single Order
        description: >
          Cancel a single order by ID.


          [Polymarket
          Docs](https://docs.polymarket.com/developers/CLOB/orders/cancel-orders#cancel-an-single-order)
        example: |-
          {
            "id": "<string>",
            "path": "<string>",
            "method": "<string>",
            "headers": {
              "POLY-API-KEY": "<string>",
              "POLY-SIGNATURE": "<string>",
              "POLY-TIMESTAMP": "<string>",
              "POLY-NONCE": "<string>"
            },
            "body": {
              "orderID": "<string>"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: publish.message.1
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: order
  - &ref_2
    id: order.subscribe
    title: Order.subscribe
    type: send
    messages:
      - &ref_5
        id: subscribe.message
        payload:
          - type: string
            x-parser-schema-id: ResponsePayload
            name: Response
            description: >
              Responses are structured to match Polymarket's CLOB API response
              format.


              Refer to Polymarket's [Order
              API](https://docs.polymarket.com/developers/CLOB/orders/orders)
              for more information on the response format.
        headers: []
        jsonPayloadSchema:
          type: string
          x-parser-schema-id: ResponsePayload
        title: Response
        description: >
          Responses are structured to match Polymarket's CLOB API response
          format.


          Refer to Polymarket's [Order
          API](https://docs.polymarket.com/developers/CLOB/orders/orders) for
          more information on the response format.
        example: '{}'
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe.message
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
  - *ref_4
receiveMessages:
  - *ref_5
extensions:
  - id: x-parser-unique-object-id
    value: order
securitySchemes: []

````