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

# Transactions

> Query transaction history and details from the Alephium indexer.

The indexer transaction endpoints give you richer transaction data than the raw node, including full input and output details, token transfers, contract interactions, and paginated history by address.

## Get transaction by hash

Returns full details of a confirmed transaction.

```bash theme={null}
curl "https://rpc.ralphstudio.xyz/{slug}/indexer/transactions/{tx-hash}" \
  -H "Authorization: Bearer API_KEY"
```

```json theme={null}
{
  "hash": "503a2c...",
  "blockHash": "00000000ab3c...",
  "timestamp": 1748476800000,
  "inputs": [
    {
      "hint": 714081,
      "key": "a1b2c3...",
      "attoAlphAmount": "2000000000000000000",
      "address": "1DrDyTr9...",
      "tokens": [],
      "unlockScript": "...",
      "txHashRef": "..."
    }
  ],
  "outputs": [
    {
      "hint": 714081,
      "key": "d4e5f6...",
      "attoAlphAmount": "1000000000000000000",
      "address": "1XyzAbc...",
      "tokens": [],
      "spent": null,
      "type": "AssetOutput"
    }
  ],
  "gasAmount": 20000,
  "gasPrice": "100000000000",
  "scriptExecutionOk": true,
  "coinbase": false
}
```

## Get transactions for an address

Returns paginated transaction history for an address. This is one of the most commonly used indexer endpoints.

```bash theme={null}
curl "https://rpc.ralphstudio.xyz/{slug}/indexer/addresses/{address}/transactions?page=1&limit=20" \
  -H "Authorization: Bearer API_KEY"
```

```json theme={null}
[
  {
    "hash": "503a2c...",
    "blockHash": "00000000ab3c...",
    "timestamp": 1748476800000,
    "inputs": [...],
    "outputs": [...],
    "gasAmount": 20000,
    "gasPrice": "100000000000",
    "scriptExecutionOk": true,
    "coinbase": false
  }
]
```

Results are sorted by timestamp descending, most recent first.

## Get transactions in a block

Returns all transactions included in a specific block.

```bash theme={null}
curl "https://rpc.ralphstudio.xyz/{slug}/indexer/blocks/{block-hash}/transactions?page=1&limit=20" \
  -H "Authorization: Bearer API_KEY"
```

## Get mempool transactions for an address

Returns unconfirmed transactions for an address that are currently in the mempool.

```bash theme={null}
curl "https://rpc.ralphstudio.xyz/{slug}/indexer/addresses/{address}/mempool-transactions" \
  -H "Authorization: Bearer API_KEY"
```

```json theme={null}
[
  {
    "hash": "604b3d...",
    "chainFrom": 0,
    "chainTo": 0,
    "inputs": [...],
    "outputs": [...],
    "gasAmount": 20000,
    "gasPrice": "100000000000"
  }
]
```

## Get token transfers for an address

Returns transactions where tokens were transferred to or from an address.

```bash theme={null}
curl "https://rpc.ralphstudio.xyz/{slug}/indexer/addresses/{address}/tokens-transactions?page=1&limit=20" \
  -H "Authorization: Bearer API_KEY"
```

## Understanding transaction timestamps

Timestamps in Alephium are in milliseconds since Unix epoch. To convert to a readable date in JavaScript:

```javascript theme={null}
const date = new Date(transaction.timestamp);
console.log(date.toISOString()); // "2026-05-28T12:00:00.000Z"
```

## Understanding inputs and outputs

Alephium uses a UTXO model similar to Bitcoin. Each transaction consumes existing UTXOs as inputs and creates new UTXOs as outputs.

The `spent` field on an output tells you whether that UTXO has already been consumed by another transaction. If `spent` is `null` the output is still unspent.

Token transfers appear in the `tokens` array on inputs and outputs. Each entry has an `id` (the token contract address) and an `amount`.

## Parameters reference

| Parameter  | Type    | Description                              |
| ---------- | ------- | ---------------------------------------- |
| tx-hash    | string  | Transaction hash                         |
| address    | string  | Base58-encoded Alephium address          |
| block-hash | string  | Block hash                               |
| page       | integer | Page number (default: 1)                 |
| limit      | integer | Results per page (default: 20, max: 100) |
