# transaction

{% hint style="warning" %}
Be aware that this endpoint only fetches transactions that were recently landed on the chain. Depending on the level of activities on the chain, this endpoint may be able to get transactions as far as serval hours. Fetching older transactions may return the status 'not\_found'.
{% endhint %}

### Request

#### Method:

`GET ./api/v2/transaction`

#### Parameters:

<table><thead><tr><th width="179.32569366693275">Parameter</th><th width="139.23125339579434">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>signature</code></td><td>string</td><td>Signature of a Solana transaction.</td></tr></tbody></table>

#### Request example:

{% tabs %}
{% tab title="HTTP" %}

```bash
curl --header "Authorization: $AUTH_HEADER" \
'https://ny.solana.dex.blxrbdn.com/api/v2/transaction?signature=...'
```

{% endtab %}
{% endtabs %}

### Response:

#### Fields:

<table><thead><tr><th width="206.12060301507535">Fields</th><th width="316.0202020202021">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code></td><td>string</td><td>Status of target transaction. Expected value "<code>not_found</code>", "<code>success"</code>, and "<code>failed</code>".</td></tr><tr><td><code>metadata</code></td><td><code>TransactionMeta</code></td><td>The metadata of the transaction. See below for more details</td></tr><tr><td><code>slot</code></td><td>uint64</td><td>Slot in which the transaction is included</td></tr><tr><td><code>block_time</code></td><td>uint64</td><td>Time at which transaction landed on chain</td></tr><tr><td><code>version</code></td><td>int32</td><td>Version of the transaction (represents either Legacy or Version)</td></tr></tbody></table>

`TransactionMeta`

<table><thead><tr><th width="347">Parameter</th><th width="358.2"></th><th width="369">Description</th></tr></thead><tbody><tr><td><code>err</code></td><td>string</td><td>description of error in transaction</td></tr><tr><td><code>errored</code></td><td>uint64</td><td>did transaction error?</td></tr><tr><td><code>fee</code></td><td>uint64</td><td>transaction fee</td></tr><tr><td><code>pre_balances</code></td><td>uint64</td><td>balance in wallet before transaction</td></tr><tr><td><code>post_balances</code></td><td>uint64</td><td>balance in wallet after transaction</td></tr><tr><td><code>inner_instructions</code></td><td>[] <code>TransactionMetaInnerInstruction</code></td><td>inner instructions inside of transaction</td></tr><tr><td><code>log_messages</code></td><td>string</td><td>any logs related to transaction</td></tr><tr><td><code>pre_token_balances</code></td><td>[] <code>TransactionMetaTokenBalance</code></td><td>token balances in wallet before transaction</td></tr><tr><td><code>post_token_balances</code></td><td>[] <code>TransactionMetaTokenBalance</code></td><td>token balances in wallet after transaction</td></tr></tbody></table>

Response Example:

{% tabs %}
{% tab title="JSON" %}

<pre class="language-json"><code class="lang-json"># Signature has not been found
{
  "status":"not_found", 
  "metadata":{"err":"tx not found", "errored":true}
}

# Transaction is successfully landed on chain
{
  "status":"success",
  "metadata":{"preBalances":...},
  "slot":"242622328",
  "blockTime":"1705605064",
  "version":-1
<strong>}
</strong>
# Transaction is failed
{
  "status":"failed", 
  "metadata":{"err":"tx not found", "errored":false...}
}
</code></pre>

{% endtab %}
{% endtabs %}


---

# 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://docs.bloxroute.com/solana/trader-api/api-endpoints/core-endpoints/transaction.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.
