# Eth\_getTransactionByHash

## Get transaction by hash

> Sends a JSON-RPC request to retrieve a transaction by its hash. \
> Returns the transaction object if found, otherwise returns null.<br>

```json
{"openapi":"3.0.0","info":{"title":"Ethereum JSON-RPC","version":"1.0.0"},"servers":[{"url":"https://zksync.nownodes.io"}],"security":[{"api-keyAuth":[]}],"components":{"securitySchemes":{"api-keyAuth":{"type":"apiKey","in":"header","name":"api-key"}}},"paths":{"/":{"post":{"tags":["eth_getTransactionByHash"],"summary":"Get transaction by hash","operationId":"ethGetTransactionByHash","description":"Sends a JSON-RPC request to retrieve a transaction by its hash. \nReturns the transaction object if found, otherwise returns null.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string"},"method":{"type":"string"},"params":{"type":"array","description":"Array containing a single transaction hash","items":{"type":"string","format":"hex"},"minItems":1,"maxItems":1},"id":{"type":"integer"}}}}}},"responses":{"200":{"description":"Transaction object or null","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"id":{"type":"integer"},"result":{"oneOf":[{"type":"object","description":"Transaction object","properties":{"hash":{"type":"string","description":"Transaction hash"},"nonce":{"type":"string","description":"Number of transactions made by the sender prior to this one"},"blockHash":{"type":"string","nullable":true,"description":"Hash of the block containing this transaction (null if not mined)"},"blockNumber":{"type":"string","nullable":true,"description":"Block number where this transaction was included (null if not mined)"},"transactionIndex":{"type":"string","nullable":true,"description":"Index within the block (null if not mined)"},"from":{"type":"string","description":"Sender address"},"to":{"type":"string","nullable":true,"description":"Receiver address (null when contract creation)"},"value":{"type":"string","description":"Amount of wei transferred"},"gas":{"type":"string","description":"Gas provided by the sender"},"gasPrice":{"type":"string","description":"Gas price provided by the sender in wei"},"input":{"type":"string","description":"Data sent with the transaction"},"type":{"type":"string","description":"Transaction type (e.g., 0x0 = legacy)"}}},{"type":"string","description":"Returned if transaction not found"}]}}}}}}}}}}}
```
