> For the complete documentation index, see [llms.txt](https://tutorial.neoline.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tutorial.neoline.io/reference/neo3-provider-api/gettransaction.md).

# getTransaction

Gets the transaction of the specified transaction hash.

## Parameters

#### 1. txid *(required)*

`UInt256`

The transaction hash to query.

## Returns

`Promise<Transaction>`

```ts
type Transaction = {
  hash: UInt256;
  size: number;
  blockHash: UInt256;
  blockTime: number;
  confirmations: number;
  version: number;
  nonce: number;
  systemFee: Integer;
  networkFee: Integer;
  validUntilBlock: number;
  sender: UInt160;
  signers: Signer[];
  attributes: TransactionAttribute[];
  script: Base64Encoded;
};
```

## Errors

| Code    | Name        | Description                       |
| ------- | ----------- | --------------------------------- |
| `10002` | `INVALID`   | The transaction hash is invalid.  |
| `10003` | `NOTFOUND`  | The transaction does not exist.   |
| `10008` | `RPC_ERROR` | The RPC server returned an error. |

## Example

### Request

```js
const tx = await provider.getTransaction(
  "0x28b47996fa62690e85ec54399a745eb1bd5c17c11a8b37c1cf83a1ee6f7bf5e7",
);
```

### Response

```js
{
  txid: '0x28b47996fa62690e85ec54399a745eb1bd5c17c11a8b37c1cf83a1ee6f7bf5e7',
  executions: [
    {
      trigger: 'Application',
      vmstate: 'HALT',
      exception: null,
      gasconsumed: '284442',
      stack: [
        {
          type: 'Any'
        }
      ],
      notifications: [
        {
          contract: '0x9bea75cf702f6afc09125aa6d22f082bfd2ee064',
          eventname: 'FeedUpdated',
          state: {
            type: 'Array',
            value: [
              {
                type: 'ByteString',
                value: 'VFdFTFZFREFUQTpTT0wtVVNE'
              },
              {
                type: 'Integer',
                value: '1773432438'
              },
              {
                type: 'Integer',
                value: '83370000'
              },
              {
                type: 'Integer',
                value: '1775813652'
              },
              {
                type: 'ByteString',
                value: 'C2At7Fcp1GNBp+k3xZ3pGWsmdDwUsxoFfuNWBXNS9q8='
              },
              {
                type: 'Integer',
                value: '1'
              }
            ]
          }
        }
      ]
    }
  ]
}
```
