๐จโ๐ป Get Bitcoin transaction by hash
Code samples
GET /api/v1/btc/transactions/{hash}
Returns transaction details using the getrawtransaction method with verbose output.
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hash | path | string | true | Bitcoin transaction hash (txid). |
Example responses
200 Response
{
"txid": "string",
"hash": "string",
"version": 0,
"size": 0,
"vsize": 0,
"weight": 0,
"locktime": 0,
"blockhash": "string",
"confirmations": 0,
"time": 0,
"blocktime": 0,
"hex": "string",
"vin": [
{
"txid": "string",
"vout": 0,
"coinbase": "string",
"scriptSig": {
"asm": "string",
"hex": "string"
},
"sequence": 0
}
],
"vout": [
{
"value": 0.1,
"n": 0,
"scriptPubKey": {
"asm": "string",
"hex": "string",
"type": "string",
"reqSigs": 0,
"addresses": [
"string"
]
}
}
]
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Bitcoin transaction | BtcTransaction |
| 404 | Not Found | Transaction not found | Inline |
| 500 | Internal Server Error | Could not connect to BTC node | None |
๐ Response Schema
Status Code 404
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป error | string | false | none | none |