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

# Create batch trigger

> Register a conditional native-order batch over the Relay WebSocket.

> [!WARNING]
>
> Conditional-order submission is not a supported live Relay flow on either network.

The message uses the same signed payload as the [REST method](https://docs.kuru.io/api/relay/reference/create-batch-trigger.md), replacing `requestId` and `wallet` with connection-local `id`.


## AsyncAPI

````yaml api/relay/asyncapi.yaml createBatchTrigger
id: createBatchTrigger
title: Create batch trigger
description: Register a conditional native-order batch. Not a supported live Relay flow.
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:
  - protocol: ws
    version: 0.1.0
    value:
      method: GET
      query:
        type: object
        required:
          - account_id
        properties:
          account_id:
            type: string
            pattern: ^[1-9][0-9]*$
            maxLength: 13
            description: >-
              Exactly one canonical positive uint40 Kuru trading account ID (1
              through 1099511627775), without leading zero, sign, or whitespace.
            examples: &ref_0
              - '123'
    schemaProperties:
      - name: method
        type: string
        description: GET
        required: false
      - name: query
        type: object
        required: false
        properties:
          - name: account_id
            type: string
            description: >-
              Exactly one canonical positive uint40 Kuru trading account ID (1
              through 1099511627775), without leading zero, sign, or whitespace.
            examples: *ref_0
            required: true
operations:
  - &ref_2
    id: receiveCreateBatchTrigger
    title: Receive create batch trigger
    type: receive
    messages:
      - &ref_3
        id: request
        contentType: application/json
        payload:
          - allOf: &ref_1
              - 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.create_batch_trigger
                    x-parser-schema-id: <anonymous-schema-26>
                x-parser-schema-id: <anonymous-schema-25>
            x-parser-schema-id: CreateBatchTriggerRequest
            name: wallet.create_batch_trigger
        headers: []
        jsonPayloadSchema:
          allOf: *ref_1
          x-parser-schema-id: CreateBatchTriggerRequest
        title: wallet.create_batch_trigger
        example: |-
          {
            "id": "batch-trigger-45",
            "method": "wallet.create_batch_trigger",
            "payload": {
              "header": {
                "accountId": "123",
                "market": "0x8121ee960066e4344a213f9ac7502395502aee7a",
                "authNonce": "1",
                "nonce": "1720000000123",
                "deadline": "1720000030",
                "clientOrderId": "0x0000000000000000000000000000000000000000000000000000000000000001",
                "builder": "0x0000000000000000000000000000000000000000",
                "builderFeePps": "0"
              },
              "triggerExpiry": "1720003600",
              "conditionSchema": "1",
              "condition": "0x00000001...",
              "conditionHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
              "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: createBatchTrigger
sendOperations:
  - *ref_2
receiveOperations: []
sendMessages:
  - *ref_3
receiveMessages: []
extensions:
  - id: x-parser-unique-object-id
    value: createBatchTrigger
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.