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

# Transactions 🌱

### Table Details

| Property          | Value                        |
| ----------------- | ---------------------------- |
| Table Name        | `spark.raw.transactions`     |
| Table Status      | Beta 🌱                      |
| Unique Key        | `block_timestamp_unix`, `id` |
| Clustering Key(s) | `to_date("block_timestamp")` |

### Table Columns

| Column Name            | Data Type         | Description                                                                                                                                                                                                                                               |
| ---------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| block\_timestamp       | TIMESTAMP\_NTZ(9) | UTC timestamp of the block containing this transaction.                                                                                                                                                                                                   |
| block\_number          | NUMBER(38,0)      | Height of the block containing this transaction.                                                                                                                                                                                                          |
| id                     | VARCHAR(16777216) | Unique transaction identifier (transaction hash).                                                                                                                                                                                                         |
| orchestra\_id          | VARCHAR(16777216) | Identifier of the Orchestra operation this transaction belongs to, when applicable.                                                                                                                                                                       |
| swap\_id               | VARCHAR(16777216) | Identifier of the swap this transaction is part of, when applicable.                                                                                                                                                                                      |
| transaction\_index     | NUMBER(38,0)      | Position of this transaction within its block.                                                                                                                                                                                                            |
| status                 | VARCHAR(16777216) | Lifecycle state of the transaction, e.g. `sent` (pending) or `confirmed` (final). Treat only `confirmed` as settled.                                                                                                                                      |
| type                   | VARCHAR(16777216) | Transaction type, e.g. `lightning_payment`, `spark_transfer`, `token_transfer`, `token_multi_transfer`, `token_mint`, `token_burn`, `bitcoin_deposit`.                                                                                                    |
| amount\_sats           | NUMBER(38,0)      | Native BTC amount in satoshis, when the transaction carries a native value.                                                                                                                                                                               |
| token\_amount          | NUMBER(38,0)      | Token amount in the token's smallest unit, when the transaction carries a token value.                                                                                                                                                                    |
| value\_usd             | FLOAT             | Indicative USD value of the transaction at scrape time (Sparkscan `valueUsd`); recomputed per scrape, so treat as approximate rather than a settled value.                                                                                                |
| bitcoin\_txid          | VARCHAR(16777216) | Underlying Bitcoin L1 transaction id, for transactions that settle on-chain (e.g. deposits/withdrawals).                                                                                                                                                  |
| created\_at            | TIMESTAMP\_NTZ(9) | Timestamp when the transaction was first observed by the indexer.                                                                                                                                                                                         |
| updated\_at            | TIMESTAMP\_NTZ(9) | Timestamp of the most recent indexer update to this transaction (e.g. a `sent` → `confirmed` transition).                                                                                                                                                 |
| expired\_time          | TIMESTAMP\_NTZ(9) | Expiry timestamp for time-bound transactions (e.g. pending Lightning payments), when applicable.                                                                                                                                                          |
| token\_transfer\_count | NUMBER(38,0)      | Number of token-transfer legs produced by this transaction (see the `token_transfers` table).                                                                                                                                                             |
| block\_timestamp\_unix | NUMBER(38,0)      | Unix timestamp (seconds) of the block containing this transaction.                                                                                                                                                                                        |
| from\_address\_details | VARIANT           | Structured sender detail (`identifier`, `pubkey`, `type`) from the raw record. Null for transaction types where the API does not populate a top-level sender (e.g. `token_multi_transfer`); use the transfer-level fields in `token_transfers` for those. |
| to\_address\_details   | VARIANT           | Structured recipient detail (`identifier`, `pubkey`, `type`) from the raw record. Null where the API does not populate a top-level recipient.                                                                                                             |
| multi\_io\_details     | VARIANT           | Raw UTXO input/output breakdown (`inputs[]`, `outputs[]`, totals) for multi-transfer transactions.                                                                                                                                                        |
| token\_metadata        | VARIANT           | Token metadata (name, ticker, decimals, token address/identifier) for token transactions.                                                                                                                                                                 |
| \_created\_at          | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was created in the database.                                                                                                                                                                                                  |
| \_updated\_at          | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was last updated in the database.                                                                                                                                                                                             |
