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

# Execute order batch

> Place native orders and cancel slots over the wallet-bound Relay WebSocket.

Send `wallet.execute_batch` with a connection-local `id`. The signed payload follows the same constraints as the [REST method](/api/relay/reference/execute-batch).


## AsyncAPI

````yaml api/relay/asyncapi.yaml executeBatch
id: executeBatch
title: Execute order batch
description: Place readable native orders, cancel slots, or perform both atomically.
servers:
  - id: mainnet
    protocol: wss
    host: relay.mainnet.kuru.io
    bindings: []
    variables: []
  - id: testnet
    protocol: wss
    host: relay.testnet.kuru.io
    bindings: []
    variables: []
address: /relay/ws
parameters: []
bindings: []
operations:
  - &ref_1
    id: receiveExecuteBatch
    title: Receive execute batch
    type: receive
    messages:
      - &ref_2
        id: request
        contentType: application/json
        payload:
          - allOf: &ref_0
              - type: object
                additionalProperties: false
                required:
                  - id
                  - method
                  - payload
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 128
                    description: Correlation ID unique within this connection.
                    x-parser-schema-id: <anonymous-schema-1>
                  method:
                    type: string
                    x-parser-schema-id: <anonymous-schema-2>
                  payload:
                    type: object
                    x-parser-schema-id: <anonymous-schema-3>
                  authorization7702:
                    oneOf:
                      - type: object
                        x-parser-schema-id: <anonymous-schema-5>
                      - type: 'null'
                        x-parser-schema-id: <anonymous-schema-6>
                    default: null
                    x-parser-schema-id: <anonymous-schema-4>
                x-parser-schema-id: BaseRequest
              - type: object
                properties:
                  method:
                    type: string
                    const: wallet.execute_batch
                    x-parser-schema-id: <anonymous-schema-19>
                x-parser-schema-id: <anonymous-schema-18>
            x-parser-schema-id: ExecuteBatchRequest
            name: wallet.execute_batch
        headers: []
        jsonPayloadSchema:
          allOf: *ref_0
          x-parser-schema-id: ExecuteBatchRequest
        title: wallet.execute_batch
        example: |-
          {
            "id": "order-42",
            "method": "wallet.execute_batch",
            "payload": {
              "header": {
                "accountId": "123",
                "market": "0x8121ee960066e4344a213f9ac7502395502aee7a",
                "authNonce": "1",
                "nonce": "1720000000123",
                "deadline": "1720000030",
                "clientOrderId": "0x0000000000000000000000000000000000000000000000000000000000000001",
                "builder": "0x0000000000000000000000000000000000000000",
                "builderFeePps": "0"
              },
              "orders": [],
              "cancelSlotIdxs": [
                "3"
              ],
              "expectedOrderIds": [
                "31"
              ],
              "signature": "0x..."
            },
            "authorization7702": null
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: request
    bindings: []
    extensions:
      - id: x-parser-unique-object-id
        value: executeBatch
sendOperations:
  - *ref_1
receiveOperations: []
sendMessages:
  - *ref_2
receiveMessages: []
extensions:
  - id: x-parser-unique-object-id
    value: executeBatch
securitySchemes:
  - id: bearerAuth
    name: bearerAuth
    type: http
    description: Wallet-bound JWT supplied in the WebSocket upgrade Authorization header.
    scheme: bearer
    bearerFormat: JWT
    extensions: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.