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
curl --location --request GET "https://api.turingbitchain.io/api/tbc/decode/txid/f2df5fd72967b2197ef2671161b6bf8d74a51c129620ceeb928a2fc3ca63a710"Example Response
{
"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
curl --location --request GET "https://api.turingbitchain.io/api/tbc/txraw/txid/f2df5fd72967b2197ef2671161b6bf8d74a51c129620ceeb928a2fc3ca63a710"Example Response
{
"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
{
"txraw": "<txraw>"
}Example Request
curl --location --request POST "https://api.turingbitchain.io/api/tbc/broadcasttx" \
--header "Content-Type: application/json" \
--data "{\"txraw\": \"0100000001a1b2c3d4e5f6789012345678901234567890123456789012345678901234567890000000006a47304402...\" }"Example Response
{
"code": "200",
"message": "OK",
"data": {
"txid": "92f2de951d01b81a44c1121f42eb63c9d0c490456e0f27530a642f6ec98c5f43"
}
}Request Parameters
| Parameter | Description |
|---|---|
| txraw | Raw transaction data in hex. |
Broadcast Transactions
You can broadcast multiple transactions to the TBC network using this endpoint. Returns the txid for each successful transaction in the response or an error message from the node.
HTTP Request
POST https://api.turingbitchain.io/api/tbc/broadcasttxsRequest Data
[
{
"txraw": "0a00000002be7aa9d0c84db3c652aaa8f48659a3d3098e0d39239e6656073c1d07ed920873000000006b483045022100a7c1e2077d18e305cc434133a87d198bdc3d8ad9127bf4a1ee0982688c7eb32e02203f65409901ab31513848c655124309fc3e6f587df9a46194fc13de27da93bd1e412103a82d871a085b7dc723a18b8550a73c25217305977f5c4cf4ec375d0625478747ffffffffbe7aa9d0c84db3c652aaa8f48659a3d3098e0d39239e6656073c1d07ed920873010000006b483045022100db09135a5bcd58f3016cff0b9c7ede7243fb290ac900599904b7c22b90e655b9022060a3053a6f74f5148bb82f4eab1782d588513e5ddd8ab060b17f1aecbf171786412103a82d871a085b7dc723a18b8550a73c25217305977f5c4cf4ec375d0625478747ffffffff0200e87648170000001976a9147a8f15d33528937e563bb2b3843a2185e09c3a8788ac90d07648170000001976a9147a8f15d33528937e563bb2b3843a2185e09c3a8788ac00000000"
},
{
"txraw": "0a00000004568db970e5920367c4d741db4d257a1cff7b91c678bae7dd2c763df19a3e801e010000006a4730440220546445b98ebe2d1f939dd7f5f0d75109f6c2c183210c3052502f84e6527e4f9c02200b69f80ff6137da14dddf46d5f3c0ce42d9f0fd75fe8516ff0a89328f57adde04121022dc251e196b09e0a30cf5492f7ff6a138081545facd81022ec0eabda14355730ffffffff9306bf548d96fa26dc78464d99f62c80310e79c0d348643f6ae701315c9c3cd5010000006b483045022100b754e042742dfabf0d8befbefbabef7dc83ca092e38a4fbc5b2aba6b8306045c0220493eb4a0725fa89a21fe8d181346dce0ce7cdfbdfc7a16d4662e13b4cf52df714121022dc251e196b09e0a30cf5492f7ff6a138081545facd81022ec0eabda14355730ffffffff08515c8bfe6a306b3aa341d37a2e10741b7747e2ba41aeddeff2811a7be7ce89010000006b48304502210098f2e463a0f11d449519813171c586fec89e67a345ef5c49d080ec126b68551d02200bfdd58758cd8c3a88a1fc5ff7d988cb5048b47e67c1a9a78ef7c52ca221fe724121022dc251e196b09e0a30cf5492f7ff6a138081545facd81022ec0eabda14355730ffffffffdc753168f43a19ceeb2607f77756531c278fde28c0699ff775d3eadd944e8b98010000006b483045022100cfb963a2f4769351698b9100eb8c8feaf7aba8b62610510d3a201e66eee0131d0220532c218f27eaeaceb8085a5dc28069ed45fb805301380ecceedc52f840b3191e4121022dc251e196b09e0a30cf5492f7ff6a138081545facd81022ec0eabda14355730ffffffff0200e87648170000001976a9142158ccfe3dc673b74e67c1ffd77842fd8bc4361c88acd458b1df5a0000001976a9142158ccfe3dc673b74e67c1ffd77842fd8bc4361c88ac00000000"
}
]Example Response (Success)
{
"code": "200",
"message": "OK",
"data": {
"results": [
{
"txid": "2a2c2db97aa0f515d37e47bb211a7d42d033a8479ac1d835489db6fce5476b5b"
},
{
"txid": "1763eedf1db330f2cf92c5e802769a80a5a6125b336b1072ac2b43330465af2d"
}
],
"success": 2,
"failed": 0
}
}Example Response (Partial Failure)
{
"code": "400",
"message": "partial failure: 1 succeeded, 1 failed",
"data": {
"results": [
{
"txid": "fc33b17d9e018d3ac3ca2ce030395a520fd012069c13e341e6e02313f0f6ef6c"
},
{
"error": "transaction already exists in mempool"
}
],
"success": 1,
"failed": 1
}
}Request Parameters
| Parameter | Description |
|---|---|
| txraw | Raw transaction data in hex. |