Transactions

Broadcast raw transaction

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

Changed in 14 of the 53 revisions of this API.2129

  • 30468ca2533f21See the full diff
    • request body became required

      request-body-became-required

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

      request-body-min-length-increased

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

      response-media-type-added

  • f7f733b4a1fc12See the full diff
    • removed the media type text/plain for the response with the status 400

      response-media-type-removed

    • request body became optional

      request-body-became-optional

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

      request-body-min-length-decreased

  • eb2153a4a3ad21See the full diff
    • request body became required

      request-body-became-required

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

      request-body-min-length-increased

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

      response-media-type-added

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

      response-media-type-removed

    • request body became optional

      request-body-became-optional

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

      request-body-min-length-decreased

  • 97e7080a813021See the full diff
    • request body became required

      request-body-became-required

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

      request-body-min-length-increased

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

      response-media-type-added

  • db8094c96a6e12See the full diff
    • removed the media type text/plain for the response with the status 400

      response-media-type-removed

    • request body became optional

      request-body-became-optional

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

      request-body-min-length-decreased

  • 68660d89e56f21See the full diff
    • request body became required

      request-body-became-required

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

      request-body-min-length-increased

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

      response-media-type-added

  • d7bba78bfcac12See the full diff
    • removed the media type text/plain for the response with the status 400

      response-media-type-removed

    • request body became optional

      request-body-became-optional

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

      request-body-min-length-decreased

    • request body became required

      request-body-became-required

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

      request-body-min-length-increased

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

      response-media-type-added

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

      response-media-type-removed

    • api operation id post_core_node_transactions removed and replaced with broadcastTransaction

      api-operation-id-removed

    • added the media type application/json to the request body

      request-body-media-type-added

    • added the media type application/json for the response with the status 200

      response-media-type-added

    • added the non-success response with the status 500

      response-non-success-status-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog