# getTransaction

Get information about a specific transaction.

## **Input Arguments**

<table><thead><tr><th width="309">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>txid: string</code></td><td>The id of the transaction you would like to get information about</td></tr></tbody></table>

## **Success Response**

The wallet will return the direct response from the RPC node.

## **Error Response**

<table><thead><tr><th width="310">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>type: string</code></td><td>The type of error which has occured</td></tr><tr><td><code>description: string</code></td><td>A description of the error which has occured</td></tr><tr><td><code>data: string</code></td><td>Any raw data associated with the error</td></tr></tbody></table>

## Example

### Request

```js
neolineN3.getTransaction({
    txid: '0xe5a5fdacad0ba4e8d34d2fa0638357adb0f05e7fc902ec150739616320870f50'
})
.then(result => {
    console.log('Transaction details: ' + JSON.stringify(result));
})
.catch((error) => {
    const {type, description, data} = error;
    switch(type) {
        case 'NO_PROVIDER':
            console.log('No provider available.');
            break;
        case 'RPC_ERROR':
            console.log('There was an error when broadcasting this transaction to the network.');
            break;
        default:
            // Not an expected error object.  Just write the error to the console.
            console.error(error);
            break;
    }
});
```

### Response

```js
{
    "hash": "0xc156988547570d1c852d9a56324b2e09d89077ff0aee2070d0b470332ae1e083",
    "size": 244,
    "sys_fee": "0.0997775",
    "net_fee": "0.0124379",
    "block_index": 103879,
    "block_time": 1618238381713,
    "version": 0,
    "transfers": [
        {
            "hash": "0xc156988547570d1c852d9a56324b2e09d89077ff0aee2070d0b470332ae1e083",
            "src": "tx",
            "contract": "0xd2a4cff31913016155e38e474a2c06d08be276cf",
            "from": "",
            "to": "NaUjKgf5vMuFt7Ffgfffcpc41uH3adx1jq",
            "amount": "0.00004914"
        },
        {
            "hash": "0xc156988547570d1c852d9a56324b2e09d89077ff0aee2070d0b470332ae1e083",
            "src": "tx",
            "contract": "0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5",
            "from": "NaUjKgf5vMuFt7Ffgfffcpc41uH3adx1jq",
            "to": "NaUjKgf5vMuFt7Ffgfffcpc41uH3adx1jq",
            "amount": "1"
        }
    ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tutorial.neoline.io/reference/neo3-provider-api-legacy/read-methods/gettransaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
