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

# Submit transaction replacement

> Submits a replacement transaction to the network.

## Cost

This endpoint costs **0.1 RU** (Request Units) per call.


## OpenAPI

````yaml POST /v1/rpc/submitTransactionReplacement
openapi: 3.0.0
info:
  title: Kaspa Developer Platform (KDP) API
  description: >-
    A high-performance REST API providing real-time and historical data from the
    Kaspa blockchain
  version: '1.0'
  contact: {}
servers:
  - url: https://api.kas.fyi
    description: Mainnet API
security: []
tags:
  - name: Address
    description: Operations related to Kaspa addresses
  - name: Block
    description: Operations related to Kaspa blocks
  - name: Transaction
    description: Operations related to Kaspa transactions
  - name: Token
    description: Operations related to KRC20 tokens
  - name: Kaspa Node RPC Proxy
    description: Direct proxy to Kaspa node RPC methods
paths:
  /v1/rpc/submitTransactionReplacement:
    post:
      tags:
        - Kaspa Node RPC Proxy
      summary: Submit transaction replacement
      description: Submits a replacement transaction to the network.
      operationId: RpcController_submitTransactionReplacement
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RpcSubmitTransactionReplacementRequestDto'
      responses:
        '200':
          description: Transaction replacement submitted successfully
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/RpcSubmitTransactionReplacementResponseDto
      security:
        - x-api-key: []
components:
  schemas:
    RpcSubmitTransactionReplacementRequestDto:
      type: object
      properties:
        transaction:
          description: Replacement transaction to submit
          allOf:
            - $ref: '#/components/schemas/RpcSubmitTransactionDto'
      required:
        - transaction
    RpcSubmitTransactionReplacementResponseDto:
      type: object
      properties:
        transactionId:
          type: string
          description: ID of the replacement transaction
          example: 34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6
        replacedTransaction:
          description: The transaction that was replaced
          allOf:
            - $ref: '#/components/schemas/RpcSubmitTransactionDto'
      required:
        - transactionId
        - replacedTransaction
    RpcSubmitTransactionDto:
      type: object
      properties:
        version:
          type: number
          description: Transaction version
          example: 0
        inputs:
          description: Transaction inputs
          type: array
          items:
            $ref: '#/components/schemas/RpcSubmitTransactionInputDto'
        outputs:
          description: Transaction outputs
          type: array
          items:
            $ref: '#/components/schemas/RpcSubmitTransactionOutputDto'
        lockTime:
          type: number
          description: Lock time
          example: 0
        subnetworkId:
          type: string
          description: Subnetwork ID
          example: '0000000000000000000000000000000000000000'
        gas:
          type: string
          description: Gas limit (as string)
          example: '0'
        payload:
          type: string
          description: Transaction payload in hex
          example: ''
      required:
        - version
        - inputs
        - outputs
        - lockTime
        - subnetworkId
        - gas
    RpcSubmitTransactionInputDto:
      type: object
      properties:
        previousOutpoint:
          description: Previous transaction outpoint
          allOf:
            - $ref: '#/components/schemas/RpcSubmitTransactionOutpointDto'
        signatureScript:
          type: string
          description: Signature script in hex format
          example: >-
            4123c94e322fd98ce4ba8b2e33b47f2984a2f741ecfea6fb48eb90d209a46b9d58639888a1575a717cb243b006edd720a7153e9a7e63f4539958d0a44eea8bfa9f01
        sequence:
          type: number
          description: Input sequence number
          example: 0
        sigOpCount:
          type: number
          description: Number of signature operations
          example: 1
      required:
        - previousOutpoint
        - signatureScript
        - sequence
        - sigOpCount
    RpcSubmitTransactionOutputDto:
      type: object
      properties:
        value:
          type: string
          description: Output value in SOMPI (as string)
          example: '100000'
        scriptPublicKey:
          description: Script public key
          allOf:
            - $ref: '#/components/schemas/RpcSubmitScriptPublicKeyDto'
      required:
        - value
        - scriptPublicKey
    RpcSubmitTransactionOutpointDto:
      type: object
      properties:
        transactionId:
          type: string
          description: Transaction ID
          example: fa99f98b8e9b0758100d181eccb35a4c053b8265eccb5a89aadd794e087d9820
        index:
          type: number
          description: Output index
          example: 1
      required:
        - transactionId
        - index
    RpcSubmitScriptPublicKeyDto:
      type: object
      properties:
        version:
          type: number
          description: Script version
          example: 0
        script:
          type: string
          description: Script in hex format
          example: 208b42bec57f9a538f740b067f947a5b29e04043218a37ff1fa7fb5ee850fd3fd3ac
      required:
        - version
        - script
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key required for authentication. Get your API key at
        https://developer.kas.fyi

````