Transaction
Get by Transaction Hash
This endpoint retrieves the transaction details for a given transaction ID.
HTTP Request
GET https://api.turingbitchain.io/api/tbc/decode/txid/{txid}Example Request
shell
curl --location --request GET "https://api.turingbitchain.io/api/tbc/decode/txid/f2df5fd72967b2197ef2671161b6bf8d74a51c129620ceeb928a2fc3ca63a710"Example Response
json
{
"code": "200",
"message": "OK",
"data": {
"hex": "0a000000010000000000000000000000000000000000000000000000000000000000000000ffffffff04037f930cffffffff0230dc090d00000000d276a914b3f89180086dfaa2ed10becff8f3b7051114fd0a88ac6a7f930c025bd4599f5812f534d9748503b8ecc459782377c020e2b607102cb0ad777529884b3045022100e0d9124b52260c56c948ef299c38193fbeb3e90834d6efe72093407742ea71320220686ad98b7bcb2d2de9ae2fa3b3d84da1e0d9083f7e1953bb6905e4e4024579e20cf85023473045022100fd31c765641821414532a980e050d5a978ff366964217eb0059623f564ea8dfc02206277a8b4ffb9f9006c1bee306372d84db6ed5c2557add19f9842f2e54de4b6b610e23618000000001976a91476d3753bc349e4b4e3b476c13709960115377ed488ac00000000",
"txid": "f2df5fd72967b2197ef2671161b6bf8d74a51c129620ceeb928a2fc3ca63a710",
"hash": "f2df5fd72967b2197ef2671161b6bf8d74a51c129620ceeb928a2fc3ca63a710",
"size": 308,
"version": 10,
"locktime": 0,
"vin": [
{
"coinbase": "037f930c",
"sequence": 4294967295
}
],
"vout": [
{
"value": 218.75,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 b3f89180086dfaa2ed10becff8f3b7051114fd0a OP_EQUALVERIFY OP_CHECKSIG OP_RETURN OP_SPLIT OP_ADD 025bd4599f5812f534d97485 -4517048 9 OP_OVER 77c020e2b607102cb0ad777529884b3045022100e0d9124b52260c56c948ef299c3819 beb3e90834d6efe72093407742ea71320220686ad98b7bcb2d2de9ae2fa3b3d84da1e0d9083f7e1953bb6905e4e4024579e20cf85023473045022100fd31c7 OP_VERIF OP_NOTIF 21414532a980e050d5a978ff366964217eb0059623f564ea OP_2MUL OP_UNKNOWN 25120 OP_NIP OP_SHA256 OP_NOP5 OP_INVALIDOPCODE OP_NOP10 OP_UNKNOWN 0 OP_FROMALTSTACK [error]",
"hex": "76a914b3f89180086dfaa2ed10becff8f3b7051114fd0a88ac6a7f930c025bd4599f5812f534d9748503b8ecc459782377c020e2b607102cb0ad777529884b3045022100e0d9124b52260c56c948ef299c38193fbeb3e90834d6efe72093407742ea71320220686ad98b7bcb2d2de9ae2fa3b3d84da1e0d9083f7e1953bb6905e4e4024579e20cf85023473045022100fd31c765641821414532a980e050d5a978ff366964217eb0059623f564ea8dfc02206277a8b4ffb9f9006c1bee306372d84db6ed5c2557add19f9842f2e54de4b6b6",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"1HQbjAs7CQAKeV3FQEUGuepBfR2pJDzUjK"
]
}
},
{
"value": 406.25,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 76d3753bc349e4b4e3b476c13709960115377ed4 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a91476d3753bc349e4b4e3b476c13709960115377ed488ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"1BqJ3zWFfbagnvHgPsAskz3pARqK7zrAaF"
]
}
}
],
"blockhash": "00000000741ce17614ba9283ce49dd43c8c46d174144c9e51cc05540696c67a7",
"confirmations": 85650,
"time": 1708358793,
"blocktime": 1708358793
}
}URL Parameters
| Parameter | Description |
|---|---|
| txid | Transaction ID. |
Get raw by Transaction Hash
This endpoint retrieves the transaction rawhex for a given transaction ID.
HTTP Request
GET https://api.turingbitchain.io/api/tbc/txraw/txid/{txid}Example Request
shell
curl --location --request GET "https://api.turingbitchain.io/api/tbc/txraw/txid/f2df5fd72967b2197ef2671161b6bf8d74a51c129620ceeb928a2fc3ca63a710"Example Response
json
{
"code": "200",
"message": "OK",
"data": {
"txraw": "0a000000010000000000000000000000000000000000000000000000000000000000000000ffffffff04037f930cffffffff0230dc090d00000000d276a914b3f89180086dfaa2ed10becff8f3b7051114fd0a88ac6a7f930c025bd4599f5812f534d9748503b8ecc459782377c020e2b607102cb0ad777529884b3045022100e0d9124b52260c56c948ef299c38193fbeb3e90834d6efe72093407742ea71320220686ad98b7bcb2d2de9ae2fa3b3d84da1e0d9083f7e1953bb6905e4e4024579e20cf85023473045022100fd31c765641821414532a980e050d5a978ff366964217eb0059623f564ea8dfc02206277a8b4ffb9f9006c1bee306372d84db6ed5c2557add19f9842f2e54de4b6b610e23618000000001976a91476d3753bc349e4b4e3b476c13709960115377ed488ac00000000"
}
}URL Parameters
| Parameter | Description |
|---|---|
| txid | Transaction ID. |
Broadcast Transaction
You can broadcast a transaction to the TBC network using this endpoint. Returns the txid in the response or an error message from the node.
HTTP Request
POST https://api.turingbitchain.io/api/tbc/broadcasttxRequest Data
json
{
"txraw": "<txraw>"
}Example Request
shell
curl --location --request POST "https://api.turingbitchain.io/api/tbc/broadcasttx" \
--header "Content-Type: application/json" \
--data "{\"txraw\": \"0100000001a1b2c3d4e5f6789012345678901234567890123456789012345678901234567890000000006a47304402...\" }"Example Response
json
{
"code": "200",
"message": "OK",
"data": {
"txid": "92f2de951d01b81a44c1121f42eb63c9d0c490456e0f27530a642f6ec98c5f43"
}
}Request Parameters
| Parameter | Description |
|---|---|
| txraw | Raw transaction data in hex. |
Broadcast Transactions
You can broadcast transactions to the TBC network using this endpoint. Returns the txid in the response or an error message from the node.
HTTP Request
POST https://api.turingbitchain.io/api/tbc/broadcasttxsRequest Data
json
[
{
"txraw": "txraw1"
},
{
"txraw": "txraw2"
}
,...
]Example Request
shell
curl --location --request POST "https://api.turingbitchain.io/api/tbc/broadcasttx" \
--header "Content-Type: application/json" \
--data "{\"txraw\": \"0a00000002be7aa9d0c84db3c652aaa8f48659a3d3098e0d39239e6656073c1d07ed920873000000006b483045022100a7c1e2077d18e305cc434133a87d198bdc3d8ad9127bf4a1ee0982688c7eb32e02203f65409901ab31513848c655124309fc3e6f587df9a46194fc13de27da93bd1e412103a82d871a085b7dc723a18b8550a73c25217305977f5c4cf4ec375d0625478747ffffffffbe7aa9d0c84db3c652aaa8f48659a3d3098e0d39239e6656073c1d07ed920873010000006b483045022100db09135a5bcd58f3016cff0b9c7ede7243fb290ac900599904b7c22b90e655b9022060a3053a6f74f5148bb82f4eab1782d588513e5ddd8ab060b17f1aecbf171786412103a82d871a085b7dc723a18b8550a73c25217305977f5c4cf4ec375d0625478747ffffffff0200e87648170000001976a9147a8f15d33528937e563bb2b3843a2185e09c3a8788ac90d07648170000001976a9147a8f15d33528937e563bb2b3843a2185e09c3a8788ac00000000\" }"Request Parameters
| Parameter | Description |
|---|---|
| txraw | Raw transaction data in hex. |