# GetTransaction

This API returns the transaction being queried in json format.

**RPC Method:** script.GetTransaction

**Query** Parameters

hash: the transaction hash\*

**Returns**

block\_hash: hash of the block that contains the transaction

block\_height: height of the block that contains the transaction

status: status of the transaction

hash: the hash of the transaction itself

transaction: the details of the transaction

`// Request`

`curl -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"script.GetTransaction","params":[{"hash":"0xf3cc94af7a1520b384999ad106ade9738b6cde66e2377ceab37067329d7173a0"}],"id":1}' http://localhost:16888/rpc`

`// Result`

`{`

&#x20;`"jsonrpc": "2.0",`

&#x20;`"id": 1,`

&#x20;`"result": {`

&#x20;`"block_hash": "0x9f1e77b08c9fa8984096a735d0aae6b0e43aee297e42c54ce36334103ddd67a7",`

&#x20;`"block_height": "3",`

&#x20;`"status": "finalized",`

&#x20;`"hash": "0xf3cc94af7a1520b384999ad106ade9738b6cde66e2377ceab37067329d7173a0",`

&#x20;`"transaction": {`

&#x20;`"fee": {`

&#x20;`" SCPTWei ": "0",`

&#x20;`" SPAYWei ": "1000000000000"`

&#x20;`},`

&#x20;`"inputs": [{`

&#x20;`"address": "0x2e833968e5bb786ae419c4d13189fb081cc43bab",`

&#x20;`"coins": {`

&#x20;`" SCPTWei ": "0",`

&#x20;`" SPAYWei ": "20000001000000000000"`

&#x20;`},`

&#x20;`"sequence": "1",`

&#x20;`"signature": "0x2f8f17b13c07e57d4c5d2c89e87d9e608f0eff22ef1f96eed5647b063265450216ef4f7a8578bf702cf26db00fb2e758521873bb1b68528325c84b59a2debc7400"`

&#x20;`}],`

&#x20;`"outputs": [{`

&#x20;`"address": "0x9f1233798e905e173560071255140b4a8abd3ec6",`

&#x20;`"coins": {`

&#x20;`" SCPTWei ": "0",`

&#x20;`" SPAYWei ": "20000000000000000000"`

&#x20;`}`

&#x20;`}]`

&#x20;`}`

&#x20;`}`

`}`
