๐ Send pre-signed raw Bitcoin transaction
Code samples
POST /api/v1/btc/transactions/send-raw
Sends a signed, hex-encoded Bitcoin transaction using the sendrawtransaction JSON-RPC method.
Body parameter
{
"rawTransaction": "020000000001...",
"signedTransaction": "020000000001..."
}
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| ยป rawTransaction | body | string | true | Signed and hex-encoded Bitcoin transaction. |
| ยป signedTransaction | body | string | false | Alternative field name accepted by the API (alias of rawTransaction). |
Example responses
200 Response
{
"transactionHash": "4e3b5a8f5e6e2b1c9d0f4c2a1b0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2"
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Transaction hash returned by node | Inline |
| 422 | Unprocessable Entity | Invalid request body (missing or invalid rawTransaction) | Inline |
| 500 | Internal Server Error | Could not connect to BTC node | None |
๐ Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป transactionHash | string | false | none | Transaction hash (txid) returned by sendrawtransaction. |
Status Code 422
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป error | string | false | none | none |