getTransaction

Clients will poll this to tell when the transaction has been completed.

This method will use 10 Compute Units.


Reference: Here

Parameters

  • hash (string)(required) Transaction hash to query, as a hex-encoded string

Returns

  • status string - The current status of the transaction by hash

    • Allowed values:SUCCESSNOT_FOUNDFAILED

  • latestLedger string - The latest ledger known to Soroban-RPC at the time it handled the getTransaction() request.

  • latestLedgerCloseTime string - The unix timestamp of the close time of the latest ledger known to Soroban-RPC at the time it handled the getTransaction() request.

  • oldestLedger string - The oldest ledger ingested by Soroban-RPC at the time it handled the getTransaction() request.

  • oldestLedgerCloseTime string - The unix timestamp of the close time of the oldest ledger ingested by Soroban-RPC at the time it handled the getTransaction() request.

  • ledger string - (optional) The sequence of the ledger which included the transaction. This field is only present if status is SUCCESS or FAILED.

  • createdAt string - (optional) The unix timestamp of when the transaction was included in the ledger. This field is only present if status is SUCCESS or FAILED.

  • applicationOrder number - (optional) The index of the transaction among all transactions included in the ledger. This field is only present if status is SUCCESS or FAILED.

  • feeBump boolean - (optional) Indicates whether the transaction was fee bumped. This field is only present if status is SUCCESS or FAILED.

  • envelopeXdr string - (optional) A base64 encoded string of the raw TransactionEnvelope XDR struct for this transaction.

  • resultXdr string - (optional) A base64 encoded string of the raw TransactionResult XDR struct for this transaction. This field is only present if status is SUCCESS or FAILED.

  • resultMetaXdr string (optional) A base64 encoded string of the raw TransactionResultMeta XDR struct for this transaction.

// SUCCESS
{
  "jsonrpc": "2.0",
  "id": 8675309,
  "result": {
    "status": "SUCCESS",
    "latestLedger": "45075181",
    "latestLedgerCloseTime": "1677115742",
    "oldestLedger": "45070000",
    "latestLedgerCloseTime": "1677000000",
    "ledger": "45070700",
    "createdAt": "1677009000",
    "applicationOrder": 1,
    "feeBump": false,
    "envelope_xdr": "AAAAAgAAAABzdv3ojkzWHMD7KUoXhrPx0GH18vHKV0ZfqpMiEblG1gAAp18AAAAAAAAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAHN2/eiOTNYcwPspSheGs/H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AAAAAAAAClLgAAAAAAAAABAAAAAAAAABgAAAAAAAAAAQAAAA0AAAAg4avr0cYyEk0etiaStUgJ889XGSqUqZEZcCyR+ma87LIAAAAA1pFOFvAXyYyG3zRHjl+0ABs5xH4/40CX9PPHFC+QN5jLvEh1Deu4U1CTs96viKx/TP+HQlV2pY3iusdUrNtGFrr72ylPbuM+gn7/FJKmJcDFiKveRR/kP8mOYOcy9S4RAAAAAA=="
  }
}


// NOT FOUND
{
  "jsonrpc": "2.0",
  "id": 8675309,
  "result": {
    "status": "NOT_FOUND",
    "latestLedger": "45075181",
    "latestLedgerCloseTime": "1677115742",
    "oldestLedger": "45070000",
    "latestLedgerCloseTime": "1677000000"
  }
}
curl https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
  "jsonrpc": "2.0",
  "id": 8675309,
  "method": "getTransaction",
  "params": {
    "hash": "a01441a4d0b80769d2c2d97dcd28d13e9036065da14ea83731424d77efc50894"
  }
}'

Last updated