testmempoolaccept
POST
Verifies whether a transaction would be accepted into the mempool without actually submitting it.Use it as a pre-flight check before broadcasting.
📘 Submitting more than one transaction validates them as a package, in which case package-error may be returned.
param[0]
rawtxsarrayrequired
The hex strings of the transactions to validate.param[1]
maxfeeratestringrequired
Reject transactions whose fee rate is higher than this value, expressed in BTC/kvB.Fee rates larger than 1 BTC/kvB are rejected. Set to 0 to accept any fee rate.Responses
txidstring
The transaction id.wtxidstring
The hash of the serialized transaction, including witness data.package-errorstring
A package validation error. It can be returned only when more than one transaction was submitted.allowedboolean
Whether this transaction would be accepted into the mempool and pass the requested maxfeerate.vsizeinteger
The virtual transaction size as defined in BIP 141. Returned only when allowed is true.Transaction fee data. Returned only when
allowed is true.basenumber
The transaction fee, denominated in BTC.effective-feeratenumber
The effective fee rate used for validation, expressed in BTC/kvB.effective-includesarray
The list of witness hashes of the transactions whose fees and virtual sizes are included in the effective fee rate.reject-reasonstring
The reason the transaction was rejected. Returned only when allowed is false.reject-detailsstring
The details of the rejection. Returned only when allowed is false and rejection details exist.codestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "Unauthorized"}
cURL
curl -X POST 'https://bitcoin-mainnet.nodit.io' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"jsonrpc": "2.0","id": 1,"method": "testmempoolaccept","params": [["02000000013ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a00000000da00483045"],"0.10"]}'