osmosis.defi Table: fact_swaps Type: View
Records of all swaps that have occurred on Osmosis, dating back to the genesis block. The
granularity of this table is one record for each pool a swap uses. For example, if a swap uses 3
pools, there will be 3 records in this table for that swap.
Columns
| Column Name | Data Type | Description |
|---|---|---|
| BLOCK_ID | NUMBER | The block height the block was recorded at. |
| BLOCK_TIMESTAMP | TIMESTAMP_NTZ | The date and time at which the block began. |
| TX_ID | TEXT | A unique key that identifies a transaction. Called “TxHash” on block explorers. |
| TX_SUCCEEDED | BOOLEAN | Transaction status is “TRUE” if the transaction was successful, “FALSE” if the transaction failed. |
| TRADER | TEXT | The wallet address of the individual who initiated the swap. |
| FROM_AMOUNT | FLOAT | The amount that the user sent to be swapped for another currency. |
| FROM_CURRENCY | TEXT | The currency that the user sent to be swapped for another currency. |
| FROM_DECIMAL | NUMBER | Divide the swap_from_amount by POW(10, swap_from_decimal) to get the amount the user swapped. |
| TO_AMOUNT | FLOAT | The amount that the user sent to be swapped for another currency. |
| TO_CURRENCY | TEXT | The currency that the user sent to be swapped for another currency. |
| TO_DECIMAL | NUMBER | Divide the swap_to_amount by POW(10, swap_to_decimal) to get the amount the user received. |
| POOL_IDS | ARRAY | Deprecating soon! This is an array value not an integer. Use pool_id instead. Identifier for the pool within the module |
| POOL_ID | NUMBER | Identifier for the pool within the module |
| _BODY_INDEX | NUMBER | |
| FACT_SWAPS_ID | TEXT | |
| INSERTED_TIMESTAMP | TIMESTAMP_NTZ | |
| MODIFIED_TIMESTAMP | TIMESTAMP_NTZ |