Skip to main content
Schema: 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 NameData TypeDescription
BLOCK_IDNUMBERThe block height the block was recorded at.
BLOCK_TIMESTAMPTIMESTAMP_NTZThe date and time at which the block began.
TX_IDTEXTA unique key that identifies a transaction. Called “TxHash” on block explorers.
TX_SUCCEEDEDBOOLEANTransaction status is “TRUE” if the transaction was successful, “FALSE” if the transaction failed.
TRADERTEXTThe wallet address of the individual who initiated the swap.
FROM_AMOUNTFLOATThe amount that the user sent to be swapped for another currency.
FROM_CURRENCYTEXTThe currency that the user sent to be swapped for another currency.
FROM_DECIMALNUMBERDivide the swap_from_amount by POW(10, swap_from_decimal) to get the amount the user swapped.
TO_AMOUNTFLOATThe amount that the user sent to be swapped for another currency.
TO_CURRENCYTEXTThe currency that the user sent to be swapped for another currency.
TO_DECIMALNUMBERDivide the swap_to_amount by POW(10, swap_to_decimal) to get the amount the user received.
POOL_IDSARRAYDeprecating soon! This is an array value not an integer. Use pool_id instead. Identifier for the pool within the module
POOL_IDNUMBERIdentifier for the pool within the module
_BODY_INDEXNUMBER
FACT_SWAPS_IDTEXT
INSERTED_TIMESTAMPTIMESTAMP_NTZ
MODIFIED_TIMESTAMPTIMESTAMP_NTZ