> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polynode.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Transaction Tracking

> Track your transaction's block position and confirmation status

## Overview

Every transaction submitted through PolyNode RPC is tracked from submission to block inclusion. You can query the exact block position and confirmation latency.

## Submit a Transaction

<ParamField body="raw_tx" type="string" required>
  Hex-encoded signed transaction (with or without `0x` prefix)
</ParamField>

```bash theme={null}
POST https://rpc.polynode.dev/v1/tx/submit
Content-Type: application/json

{
  "raw_tx": "0x02f87083..."
}
```

### Response

```json theme={null}
{
  "tx_hash": "0xabc123...",
  "submitted_at": 1710524000,
  "status": "pending"
}
```

| Field     | Description                             |
| --------- | --------------------------------------- |
| `tx_hash` | Transaction hash                        |
| `status`  | `pending` — waiting for block inclusion |

## Check Transaction Status

```bash theme={null}
GET https://rpc.polynode.dev/v1/tx/{tx_hash}
```

### Pending

```json theme={null}
{
  "status": "pending",
  "submitted_at": 1710524000,
  "elapsed_ms": 1500
}
```

### Confirmed

```json theme={null}
{
  "status": "confirmed",
  "submitted_at": 1710524000,
  "confirmed_at": 1710524002,
  "block_number": 84210500,
  "block_hash": "0xdef456...",
  "tx_index": 0,
  "total_txs_in_block": 186,
  "is_first": true,
  "latency_ms": 2450
}
```

| Field                | Description                                         |
| -------------------- | --------------------------------------------------- |
| `block_number`       | Block the transaction was included in               |
| `tx_index`           | Position within the block (0 = first transaction)   |
| `total_txs_in_block` | Total transactions in the block                     |
| `is_first`           | Whether this was the first transaction in the block |
| `latency_ms`         | Time from submission to block confirmation          |

### Expired

If a transaction isn't included within \~128 seconds (64 blocks), it's marked as expired:

```json theme={null}
{
  "status": "expired",
  "submitted_at": 1710524000,
  "reason": "not included within 64 blocks"
}
```

## Aggregate Stats

```bash theme={null}
GET https://rpc.polynode.dev/v1/stats
```

```json theme={null}
{
  "total_submitted": 1000,
  "total_confirmed": 998,
  "total_first_position": 895,
  "first_position_rate": 0.897,
  "total_expired": 2,
  "pending": 0,
  "avg_latency_ms": 2450
}
```
