Transactions

Broadcast raw transaction

Changed on

Broadcast raw transactions on the network. You can use the @stacks/transactions project to generate a raw transaction payload.

The node performs static validation checks on transactions before accepting them into the mempool, including:

  • Transaction format validation
  • Signature verification
  • Nonce checking
  • Fee validation
  • Size limits
post/v2/transactions

Request

  • Base URL
    http://localhost:20443
  • URL
    http://localhost:20443/v2/transactions
  • Auth
    none required

Request body

txstring required

Hex-encoded transaction

attachmentstring

Optional hex-encoded attachment for contract-call transactions

Response

Transaction ID of successful post of a raw tx to the node's mempool.

string required

Example response

"e161978626f216b2141b156ade10501207ae535fa365a13ef5d7a7c9310a09f2"

Changes

    • breaking

      request body became required

    • breaking

      the request's body minLength was increased from 0 to 1

    • info

      added the media type text/plain for the response with the status

    • breaking

      removed the media type text/plain for the response with the status

    • info

      request body became optional

    • info

      the request's body minLength was decreased from 1 to 0