The getTransaction method returns information about a particular transaction.

back to methods summary

Input:

ArgumentMandatoryDescription
transactionHash Yes Hash of the requested transactionstring

Output:

transaction (array)

  • transactionHash - string - hash of the transaction
  • blockIndex - uint32 - number of the block that contains a transaction (optional)
  • timestamp - uint64 - timestamp of the transaction (optional)
  • isBase - boolean - shows if the transaction is a coinbase transaction or not
  • unlockTime - uint64 - height of the block when transaction is going to be available for spending
  • amount - int64 - amount of the transaction
  • fee - uint64- transaction fee
  • extra - string
  • paymentId - string - payment_id of the transaction (optional)
  • transfers - array - contains
    • address - string
    • amount - int64

Input example:

{  
  "params":{"transactionHash":"2079ed98eefdb73b8897352e832307b1a9f2211f066083483869dc6fb808b418"},
  "jsonrpc":"2.0",
  "id":"test",
  "method":"getTransaction"
}

$ curl -s -X POST -d '{"params":{"transactionHash":"2079ed98eefdb73b8897352e832307b1a9f2211f066083483869dc6fb808b418"},"jsonrpc":"2.0","id":"test","method":"getTransaction"}' localhost:14101/json_rpc | jq

Output example:

{
  "id": "test",
  "jsonrpc": "2.0",
  "result": {
    "transaction": {
      "amount": 9500432607,
      "blockIndex": 1000,
      "extra": "0122c9d74f14f6a721329a48c0344c8f6674bccaa8ef216ff2849b9e59442c2b33",
      "fee": 0,
      "isBase": true,
      "paymentId": "",
      "state": 0,
      "timestamp": 1622597634,
      "transactionHash": "2079ed98eefdb73b8897352e832307b1a9f2211f066083483869dc6fb808b418",
      "transfers": [
        {
          "address": "ir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j",
          "amount": 9500432607,
          "type": 0
        }
      ],
      "unlockTime": 1020
    }
  }
}

back to methods summary