stellar.core Table: fact_trust_lines Type: Base Table
What
FACT_TRUST_LINES table captures trust relationship events and balance states at time of transaction activity on the Stellar network. Each record represents the trustline state (balance, limits, liabilities) for an account-asset pair as recorded when a transaction affecting that trustline occurred. NOTE: This is NOT a comprehensive daily snapshot of all account balances - it only contains records when trustlines are created, modified, or involved in transactions. To reconstruct the current or historical balance state for analysis, you must identify the most recent record per account-asset pair using techniques like ROW_NUMBER() OVER (PARTITION BY account_id, asset_id ORDER BY ledger_sequence DESC). The table includes balance changes triggered by payments, trades, trustline modifications, and other operations, but accounts with no recent activity will not have recent records. Key data points include ASSET_CODE, ASSET_ISSUER, BALANCE (at transaction time), TRUST_LINE_LIMIT, BUYING_LIABILITIES, and SELLING_LIABILITIES. The DELETED flag indicates trustline removal. This transactional approach means supply calculations require careful aggregation of the latest state per account to avoid double-counting and to account for inactive accounts not represented in recent data.Columns
| Column Name | Data Type | Description |
|---|---|---|
| ACCOUNT_ID | TEXT | ACCOUNT_ID column |
| CLOSED_AT | TIMESTAMP_NTZ | CLOSED_AT column |
| BLOCK_TIMESTAMP | TIMESTAMP_NTZ | BLOCK_TIMESTAMP column |
| ASSET_ID | NUMBER | ASSET_ID column |
| ASSET_TYPE | TEXT | ASSET_TYPE column |
| ASSET_ISSUER | TEXT | ASSET_ISSUER column |
| ASSET_CODE | TEXT | ASSET_CODE column |
| LIQUIDITY_POOL_ID | TEXT | LIQUIDITY_POOL_ID column |
| BALANCE | FLOAT | BALANCE column |
| TRUST_LINE_LIMIT | FLOAT | TRUST_LINE_LIMIT column |
| BUYING_LIABILITIES | FLOAT | BUYING_LIABILITIES column |
| SELLING_LIABILITIES | FLOAT | SELLING_LIABILITIES column |
| FLAGS | TEXT | FLAGS column |
| LAST_MODIFIED_LEDGER | NUMBER | LAST_MODIFIED_LEDGER column |
| LEDGER_ENTRY_CHANGE | NUMBER | LEDGER_ENTRY_CHANGE column |
| DELETED | BOOLEAN | DELETED column |
| LEDGER_SEQUENCE | NUMBER | LEDGER_SEQUENCE column |
| LEDGER_KEY | TEXT | LEDGER_KEY column |
| SPONSOR | TEXT | SPONSOR column |
| BATCH_ID | TEXT | BATCH_ID column |
| BATCH_RUN_DATE | TIMESTAMP_NTZ | BATCH_RUN_DATE column |
| BATCH_INSERT_TS | TIMESTAMP_NTZ | BATCH_INSERT_TS column |
| FACT_TRUST_LINES_ID | TEXT | FACT_TRUST_LINES_ID column |
| INSERTED_TIMESTAMP | TIMESTAMP_NTZ | INSERTED_TIMESTAMP column |
| MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | MODIFIED_TIMESTAMP column |