Transactions
Operations related to broadcasting and retrieving 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
Transaction ID of successful post of a raw tx to the node's mempool.
e161978626f216b2141b156ade10501207ae535fa365a13ef5d7a7c9310a09f2Pattern: ^[0-9a-f]{64}$Bad request
Internal Server Error
POST /v2/transactions HTTP/1.1
Host: localhost:20443
Content-Type: application/octet-stream
Accept: */*
Content-Length: 379
"binary format of 00000000010400bed38c2aadffa348931bcb542880ff79d607afec000000000000000000000000000000c800012b0b1fff6cccd0974966dcd665835838f0985be508e1322e09fb3d751eca132c492bda720f9ef1768d14fdabed6127560ba52d5e3ac470dcb60b784e97dc88c9030200000000000516df0ba3e79792be7be5e50a370289accfc8c9e032000000000000303974657374206d656d6f00000000000000000000000000000000000000000000000000"e161978626f216b2141b156ade10501207ae535fa365a13ef5d7a7c9310a09f2Get a JSON with the transaction details including the index_block_hash, the hex-encoded transaction body, and the result.
Transaction ID (64 hexadecimal characters)
^[0-9a-f]{64}$Transaction JSON with index_block_hash, transaction body and result
Block hash where the transaction was included
^[0-9a-f]{64}$Hex-encoded transaction
Transaction execution result (Clarity value)
Height of the block where the transaction was included
Whether the block where this transaction was included is in the canonical chain tip
Bad request
Not found
Internal Server Error
Transaction indexing not enabled
GET /v3/transaction/{txid} HTTP/1.1
Host: localhost:20443
Accept: */*
{
"index_block_hash": "e0b6c25b1dac0c0e1c75e41ab46bd6d70d9a2d02ffed8f2c0733b6e686289c38",
"result": "(ok true)",
"tx": "808000000004008bc5147525b8f477f0bc4522a88c8339b2494db5000000000000001a0000000000000000010123eab800bc9f639c5aa05d154148a981c89fd21064a6f8cafd8649800a56c9ea77e2e46bed8bd9ef0f173b19b20d6c43e2a9f37b078df5c74b9e6f9be75b650e01020000000007588687edeb02248d402c316ed33e22ea0e73af8703ce5011f3e25f5ce12f00f903ca504742117ee0588687edeb02248d402c316ed33e22ea0e73af87c54e0d94e4dd298cf19778352906a2fcf0af74582b07dfb57c710288874f71ca00000001006bc51b33e9f3626944eb879147e18111581f8f9b"
}Get an unconfirmed transaction by its transaction ID. This looks in both the mempool and unconfirmed microblock stream.
Transaction ID (64 hexadecimal characters)
^[0-9a-f]{64}$Unconfirmed transaction details
Hex-encoded transaction data
Bad request
Not found
Internal Server Error
GET /v2/transactions/unconfirmed/{txid} HTTP/1.1
Host: localhost:20443
Accept: */*
{
"tx": "800000000004...",
"status": "Mempool"
}Query the mempool for transactions that might be missing from the requesting node. This endpoint supports pagination and streaming of transaction data.
Transaction ID to start pagination from
^[0-9a-f]{64}$Binary SIP-003 encoding of MemPoolSyncData
(BloomFilter or TxTags variants).
Stream of missing transactions
Binary stream of transactions and pagination data. The stream contains serialized transactions followed by a page ID for continuation.
Bad request
Internal Server Error
POST /v2/mempool/query HTTP/1.1
Host: localhost:20443
Content-Type: application/octet-stream
Accept: */*
Content-Length: 8
"binary"binaryLast updated
Was this helpful?