sendrawtransaction
The sendrawtransaction is a Litecoin RPC method that broadcasts a raw transaction to the network. This method is used after creating and signing a transaction to submit it to the Litecoin network for processing and inclusion in a block. It's a critical step in the transaction workflow, allowing signed transactions to be propagated across the network.
Parameters
parameter | type | description |
|---|---|---|
hexstring | string (required) | The hex-encoded signed transaction to broadcast. |
maxfeerate | numeric (optional) | Maximum fee rate in LTC/kB. Rejects transactions with fees higher than this rate. Default is 0.10 LTC/kB. |
Return Object
field | type | description |
|---|---|---|
txid | string | The transaction ID of the broadcasted transaction if successful. |
Error Responses
Common errors include:
- Transaction already in block chain: The transaction has already been confirmed.
- Missing inputs: Referenced UTXOs don't exist or have already been spent.
- Bad transaction: The transaction is malformed or invalid.
- Insufficient fee: Transaction fee is too low to be accepted.
- Max fee rate exceeded: Transaction fee exceeds the maxfeerate parameter.
Request Example
Request
Response Example
Response