> ## 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 packed replacement trigger

> Register a conditional packed replacement over the Relay WebSocket.

<Warning>Conditional-order submission is not a supported live Relay flow on either network.</Warning>

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


## AsyncAPI

````yaml api/relay/asyncapi.yaml createReplaceTrigger
id: createReplaceTrigger
title: Create packed replacement trigger
description: >-
  Register a conditional compact slot replacement. 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: []
operations:
  - &ref_1
    id: receiveCreateReplaceTrigger
    title: Receive create replace trigger
    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.create_replace_trigger
                    x-parser-schema-id: <anonymous-schema-27>
                x-parser-schema-id: <anonymous-schema-26>
            x-parser-schema-id: CreateReplaceTriggerRequest
            name: wallet.create_replace_trigger
        headers: []
        jsonPayloadSchema:
          allOf: *ref_0
          x-parser-schema-id: CreateReplaceTriggerRequest
        title: wallet.create_replace_trigger
        example: |-
          {
            "id": "replace-trigger-46",
            "method": "wallet.create_replace_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",
              "packedOps": "0x<one-or-more-32-byte-words>",
              "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: createReplaceTrigger
sendOperations:
  - *ref_1
receiveOperations: []
sendMessages:
  - *ref_2
receiveMessages: []
extensions:
  - id: x-parser-unique-object-id
    value: createReplaceTrigger
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.