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

# Generates a transaction that cancels the given order

> This endpoint generates a transaction that cancels the given order. This transaction must be published to the destination chain of the order. Unlocked funds would be transferred to the address specified as the orderAuthority of the given order on the source chain. This transaction can only be executed by th orderAuthority of the given order on the destination chain



## OpenAPI

````yaml /dln-details/swagger/create-tx.json get /v1.0/dln/order/{id}/cancel-tx
openapi: 3.0.0
info:
  title: deBridge Liquidity Network (DLN) API
  description: >-
    A turnkey solution for a high-performance cross-chain trading<br><br><a
    href="https://docs.debridge.finance/dln-the-debridge-liquidity-network-protocol/interacting-with-the-api/quick-start-guide">Quick
    Start Guide</a>
  version: 1.0.0
  contact: {}
  termsOfService: https://app.debridge.finance/assets/files/DLN-TermsOfService.pdf
servers:
  - url: https://dln.debridge.finance
security: []
tags: []
externalDocs:
  description: DLN API documentation
  url: >-
    https://docs.debridge.finance/dln-the-debridge-liquidity-network-protocol/introduction
paths:
  /v1.0/dln/order/{id}/cancel-tx:
    get:
      tags:
        - DLN
      summary: Generates a transaction that cancels the given order
      description: >-
        This endpoint generates a transaction that cancels the given order. This
        transaction must be published to the destination chain of the order.
        Unlocked funds would be transferred to the address specified as the
        orderAuthority of the given order on the source chain. This transaction
        can only be executed by th orderAuthority of the given order on the
        destination chain
      operationId: DlnOrderControllerV10_cancelOrder
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DlnOrderCancelTxResponse'
        '400':
          description: >
            The request is malformed, has missing parameters, or has incorrect
            or contradicting parameter values. Possible error ids: 
              
                    - INVALID_QUERY_PARAMETERS
              
              
                    - UNKNOWN_ORDER
              
              
                    - ORDER_ALREADY_FULFILLED
              
              
                    - ORDER_ALREADY_CANCELLED
              
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '500':
          description: >
            The server has encountered a situation it does not know how to
            handle. Possible error ids: 
              
                    - INTERNAL_SERVER_ERROR
              
              
                    - INTERNAL_SDK_ERROR
              
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
components:
  schemas:
    DlnOrderCancelTxResponse:
      type: object
      properties:
        to:
          type: string
        data:
          type: string
        value:
          type: string
        chainId:
          type: number
        from:
          type: string
        cancelBeneficiary:
          type: string
      required:
        - to
        - data
        - value
        - chainId
        - from
        - cancelBeneficiary
    BadRequestResponse:
      type: object
      properties:
        errorCode:
          type: integer
        errorId:
          type: string
          enum:
            - INVALID_QUERY_PARAMETERS
            - SOURCE_AND_DESTINATION_CHAINS_ARE_EQUAL
            - INCLUDED_GAS_FEE_NOT_COVERED_BY_INPUT_AMOUNT
            - INCLUDED_GAS_FEE_CANNOT_BE_ESTIMATED_FOR_TRANSACTION_BUNDLE
        errorMessage:
          type: string
        errorPayload:
          type: object
      required:
        - errorCode
        - errorId
        - errorMessage
        - errorPayload
    InternalServerErrorResponse:
      type: object
      properties:
        errorCode:
          type: integer
        errorId:
          type: string
          enum:
            - INTERNAL_SERVER_ERROR
            - INTERNAL_SDK_ERROR
        errorMessage:
          type: string
        errorPayload:
          type: object
      required:
        - errorCode
        - errorId
        - errorMessage
        - errorPayload

````