For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 · binary · min: 1Optional
Responses
200

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

application/json
stringOptionalExample: e161978626f216b2141b156ade10501207ae535fa365a13ef5d7a7c9310a09f2Pattern: ^[0-9a-f]{64}$
post/v2/transactions
POST /v2/transactions HTTP/1.1
Host: localhost:20443
Content-Type: application/octet-stream
Accept: */*
Content-Length: 379

"binary format of 00000000010400bed38c2aadffa348931bcb542880ff79d607afec000000000000000000000000000000c800012b0b1fff6cccd0974966dcd665835838f0985be508e1322e09fb3d751eca132c492bda720f9ef1768d14fdabed6127560ba52d5e3ac470dcb60b784e97dc88c9030200000000000516df0ba3e79792be7be5e50a370289accfc8c9e032000000000000303974657374206d656d6f00000000000000000000000000000000000000000000000000"
e161978626f216b2141b156ade10501207ae535fa365a13ef5d7a7c9310a09f2

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
index_block_hashstringRequired

Block hash where the transaction was included

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

Hex-encoded transaction

resultstringRequired

Transaction execution result (Clarity value)

block_heightinteger · nullableOptional

Height of the block where the transaction was included

is_canonicalbooleanOptional

Whether the block where this transaction was included is in the canonical chain tip

get/v3/transaction/{txid}
GET /v3/transaction/{txid} HTTP/1.1
Host: localhost:20443
Accept: */*
{
  "index_block_hash": "e0b6c25b1dac0c0e1c75e41ab46bd6d70d9a2d02ffed8f2c0733b6e686289c38",
  "result": "(ok true)",
  "tx": "808000000004008bc5147525b8f477f0bc4522a88c8339b2494db5000000000000001a0000000000000000010123eab800bc9f639c5aa05d154148a981c89fd21064a6f8cafd8649800a56c9ea77e2e46bed8bd9ef0f173b19b20d6c43e2a9f37b078df5c74b9e6f9be75b650e01020000000007588687edeb02248d402c316ed33e22ea0e73af8703ce5011f3e25f5ce12f00f903ca504742117ee0588687edeb02248d402c316ed33e22ea0e73af87c54e0d94e4dd298cf19778352906a2fcf0af74582b07dfb57c710288874f71ca00000001006bc51b33e9f3626944eb879147e18111581f8f9b"
}

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
txstringOptional

Hex-encoded transaction data

statusone ofOptional
or
string · enumOptionalPossible values:
get/v2/transactions/unconfirmed/{txid}
GET /v2/transactions/unconfirmed/{txid} HTTP/1.1
Host: localhost:20443
Accept: */*
{
  "tx": "800000000004...",
  "status": "Mempool"
}

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
string · binary · min: 1Optional

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

Responses
200

Stream of missing transactions

application/octet-stream
string · binaryOptional

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

post/v2/mempool/query
POST /v2/mempool/query HTTP/1.1
Host: localhost:20443
Content-Type: application/octet-stream
Accept: */*
Content-Length: 8

"binary"
binary

Last updated

Was this helpful?