Transactions

Operations related to broadcasting and retrieving transactions.

Broadcast raw transaction

post
/v2/transactions

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

Body
string · binaryOptional
Responses
200

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

application/json
ResponsestringExample: e161978626f216b2141b156ade10501207ae535fa365a13ef5d7a7c9310a09f2Pattern: ^[0-9a-f]{64}$
post
/v2/transactions

Retrieve transaction details by TXID

get
/v3/transaction/{txid}

Get a JSON with the transaction details including the index_block_hash, the hex-encoded transaction body, and the result.

Path parameters
txidstringRequired

Transaction ID (64 hexadecimal characters)

Pattern: ^[0-9a-f]{64}$
Responses
200

Transaction JSON with index_block_hash, transaction body and result

application/json
get
/v3/transaction/{txid}

Get unconfirmed transaction

get
/v2/transactions/unconfirmed/{txid}

Get an unconfirmed transaction by its transaction ID. This looks in both the mempool and unconfirmed microblock stream.

Path parameters
txidstringRequired

Transaction ID (64 hexadecimal characters)

Pattern: ^[0-9a-f]{64}$
Responses
200

Unconfirmed transaction details

application/json
get
/v2/transactions/unconfirmed/{txid}

Query mempool for missing transactions

post
/v2/mempool/query

Query the mempool for transactions that might be missing from the requesting node. This endpoint supports pagination and streaming of transaction data.

Query parameters
page_idstringOptional

Transaction ID to start pagination from

Pattern: ^[0-9a-f]{64}$
Body

Binary SIP-003 encoding of MemPoolSyncData (BloomFilter or TxTags variants).

transactionsstring[]Optional

Transaction IDs

Responses
200

Stream of missing transactions

application/octet-stream
Responsestring · binary

Binary stream of transactions and pagination data. The stream contains serialized transactions followed by a page ID for continuation.

post
/v2/mempool/query

Last updated

Was this helpful?