Bware Docs
  • About Bware Labs Decentralized API
  • API Docs
    • Ethereum API
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websocket API
        • eth_syncing method
    • Binance Smart Chain API
      • RPC
        • eth_getTransactionByHash method
        • eth_getBlockByNumber method
        • eth_blockNumber method
        • eth_syncing method
        • eth_getBalance method
        • eth_accounts method
        • eth_gasPrice method
      • Websocket API
        • eth_syncing method
    • Avalanche API
      • X-Chain
      • C-Chain
      • P-Chain
      • Keystore API
      • Health API
      • Admin API
      • Info API
      • Metrics API
    • Moonbeam/Moonriver API
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websocket
    • Astar/Shiden APIs
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websocket
    • Fantom API
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websockets
        • eth_syncing method
    • Polkadot API
      • RPC
        • chain_getBlock
        • chain_getHeader
        • system_chainType
        • state_getMetadata
      • Websockets
        • system_chainType
    • Elrond API
      • REST API
        • Get Block By Hash
        • Get Shard Status
  • Tutorials
    • Using Bware Labs Platform
      • Getting a Bware Labs full endpoint
    • Using Bware Labs Endpoint in PolkadotJs
    • Using Bware Labs Endpoint in Metamask
    • Using a Bware Labs endpoint in code
Powered by GitBook
On this page
  • Parameters
  • Returns
  • Example

Was this helpful?

  1. API Docs
  2. Binance Smart Chain API
  3. RPC

eth_getTransactionByHash method

Returns information about a transaction for a given hash

Parameters

  1. DATA, 32 Bytes - hash of a transaction

Returns

Object - A transaction object, or null when no transaction was found

Example

// Request
curl -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x1a04014895ea49b844a588da090b1325df4888e0c97cef2e1930ecf3f3b46b76"],"id":1}' https://bsc-api.bwarelabs.com/<your-endpoint-id>

// Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0x5aacaeadbfb91fc7e178f8bc57028fb5a65dca9af9985e7a0363a4417d765222",
    "blockNumber": "0x112f67",
    "from": "0xf368735a1c7d95adadb12c0323b778ca75dc5667",
    "gas": "0x12ba4",
    "gasPrice": "0xc92a69c00",
    "hash": "0x20c0530feca5ea9b4a55dab94d6b58cb34d99caff6c266d533201347f75d23da",
    "input": "0xa9059cbb00000000000000000000000046256256100f9d80dfba2966472ef4d5d0e7d4c000000000000000000000000000000000000000000000002c9263d30351869412",
    "nonce": "0x8",
    "to": "0xe9e7cea3dedca5984780bafc599bd69add087d56",
    "transactionIndex": "0x0",
    "value": "0x0",
    "v": "0x94",
    "r": "0xdccf9919f2e4d40f1a7ad8c395d863cc9e242f364aa1b45b90ea23cf2e8c96aa",
    "s": "0x487c054671c2a9dceabf8c0163e48c17fd4b87e86b9bc7de59eea14fa564754a"
  }
}
PreviousRPCNexteth_getBlockByNumber method

Last updated 4 years ago

Was this helpful?