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

# osmosis_v1_osmosis

> Tables in tt-contracts.osmosis_v1_osmosis

## Tables

### Swap\_token\_swapped\_event

Token swap execution events from Osmosis automated market maker (AMM) pools. Contains input/output token amounts with IBC (Inter-Blockchain Communication) denominations and pool identifiers for analyzing DEX trading activity and liquidity routing.

<Accordion title="Columns">
  | Column              | Type        | Description                                                                                                                                                                                       |
  | ------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `block_timestamp`   | `TIMESTAMP` | Timestamp when the block was produced. UTC timezone, millisecond precision.                                                                                                                       |
  | `block_height`      | `INT64`     | Sequential number identifying the position of the block in the blockchain. Positive integer incremented by one for each new block.                                                                |
  | `transaction_hash`  | `STRING`    | Unique identifier for the transaction. 66-character hex string including 0x prefix.                                                                                                               |
  | `transaction_index` | `INT64`     | Position of the transaction within its containing block. Zero-indexed integer representing the sequential order of transaction execution.                                                         |
  | `message_index`     | `STRING`    | Index position of the message within the transaction that triggered this swap event. Typically '0' for single-message transactions, increments for multi-message batches.                         |
  | `event_index`       | `INT64`     | Sequential position of the event within its containing transaction. Zero-indexed integer starting from 0 for the first event in each transaction.                                                 |
  | `in_sender`         | `STRING`    | Address that initiated the transaction or operation. Hex-encoded, 0x-prefixed, 42-character string.                                                                                               |
  | `in_tokens_in`      | `STRING`    | Amount and denomination of tokens sent into the pool during the swap. Format is `\{amount\}\{denom\}` where denom is either a native token (e.g., `uosmo`) or IBC token hash.                     |
  | `in_tokens_out`     | `STRING`    | Token denomination and amount sent out from the liquidity pool during the swap. Formatted as amount followed by denomination (either native 'uosmo' or IBC-prefixed hash for cross-chain tokens). |
  | `in_pool_id`        | `STRING`    | Unique identifier of the Osmosis liquidity pool where the token swap occurred. Numeric pool ID stored as string, typically ranging from three to four digits.                                     |
  | `source`            | `STRING`    | Address or identifier of the entity that initiated or originated the transaction or event.                                                                                                        |
</Accordion>

<Accordion title="Sample Data">
  | source | in\_sender                                  | in\_pool\_id | event\_index | block\_height | in\_tokens\_in                                                                  | in\_tokens\_out                                                            | message\_index | block\_timestamp         | transaction\_hash                                                | transaction\_index |
  | ------ | ------------------------------------------- | ------------ | ------------ | ------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------- | ------------------------ | ---------------------------------------------------------------- | ------------------ |
  | me     | osmo100lk5kh7279k50nvvp907k6kfzwk9z2rp73zn3 | 565          | 56           | 18495743      | 2597400000ibc/0EF15DF2F02480ADE0BB6E85D9EBB5DAEA2836D3860E9F97F9AADE4F57A31AA0  | 35578ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2  | 0              | 2024-07-27T08:58:54.643Z | 43E9FD5595C2A43FF88A5C3FC4396EB53116C77BE9A1147FAAE4A46B123DA565 | 2                  |
  | me     | osmo100lk5kh7279k50nvvp907k6kfzwk9z2rp73zn3 | 1838         | 51           | 18495743      | 35539ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2       | 222347ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4 | 0              | 2024-07-27T08:58:54.643Z | 43E9FD5595C2A43FF88A5C3FC4396EB53116C77BE9A1147FAAE4A46B123DA565 | 2                  |
  | me     | osmo100lk5kh7279k50nvvp907k6kfzwk9z2rp73zn3 | 561          | 60           | 18495743      | 23376600000ibc/0EF15DF2F02480ADE0BB6E85D9EBB5DAEA2836D3860E9F97F9AADE4F57A31AA0 | 4106795uosmo                                                               | 0              | 2024-07-27T08:58:54.643Z | 43E9FD5595C2A43FF88A5C3FC4396EB53116C77BE9A1147FAAE4A46B123DA565 | 2                  |
</Accordion>

<Accordion title="Example Query">
  **Query with partition filter**

  ```sql theme={null}
  SELECT *
  FROM `tt-contracts.osmosis_v1_osmosis.Swap_token_swapped_event`
  WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
  LIMIT 100
  ```
</Accordion>

***

### Transfer\_transfer\_event

Transfer events from Osmosis blockchain showing token movements between accounts with sender, recipient, and amount data. Used for tracking asset flows and analyzing on-chain transfer activity across the Osmosis DEX ecosystem.

<Accordion title="Columns">
  | Column              | Type        | Description                                                                                                                                                                                                        |
  | ------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | `block_timestamp`   | `TIMESTAMP` | Timestamp when the block was produced. UTC timezone, millisecond precision.                                                                                                                                        |
  | `block_height`      | `INT64`     | Sequential number identifying the position of the block in the blockchain. Positive integer incremented by one for each new block.                                                                                 |
  | `transaction_hash`  | `STRING`    | Unique identifier for the transaction. 66-character hex string including 0x prefix.                                                                                                                                |
  | `transaction_index` | `INT64`     | Position of the transaction within its containing block. Zero-indexed integer representing the sequential order of transaction execution.                                                                          |
  | `message_index`     | `STRING`    | Identifier linking the transfer event to a specific message within the transaction that triggered it. Frequently null when events are not directly associated with individual messages in the transaction payload. |
  | `event_index`       | `INT64`     | Sequential position of the event within its containing transaction. Zero-indexed integer starting from 0 for the first event in each transaction.                                                                  |
  | `in_sender`         | `STRING`    | Address that initiated the transaction or operation. Hex-encoded, 0x-prefixed, 42-character string.                                                                                                                |
  | `in_recipient`      | `STRING`    | Address designated to receive the output tokens from a swap or operation. Hex-encoded, 0x-prefixed, 42-character string.                                                                                           |
  | `in_amount`         | `STRING`    | Input amount for the swap, transaction, or operation. Numeric string representation of token quantity in smallest denomination.                                                                                    |
  | `source`            | `STRING`    | Address or identifier of the entity that initiated or originated the transaction or event.                                                                                                                         |
</Accordion>

<Accordion title="Sample Data">
  | source | in\_amount | in\_sender | event\_index | block\_height | in\_recipient | message\_index | block\_timestamp         | transaction\_hash                                                | transaction\_index |
  | ------ | ---------- | ---------- | ------------ | ------------- | ------------- | -------------- | ------------------------ | ---------------------------------------------------------------- | ------------------ |
  | me     |            |            | 13           | 11499304      |               |                | 2023-09-18T00:00:09.524Z | 00F6D4BEEF02A9099A6F8C81D1999F40BEF7BD6A3FD4B81D90689CEFB00D0A6B | 14                 |
  | me     |            |            | 7            | 11499304      |               |                | 2023-09-18T00:00:09.524Z | 00F6D4BEEF02A9099A6F8C81D1999F40BEF7BD6A3FD4B81D90689CEFB00D0A6B | 14                 |
  | me     |            |            | 58           | 11499304      |               |                | 2023-09-18T00:00:09.524Z | 09E7CFBA2881497F6B91E62DE60B0671293393A25DDA3891B96BA217771B17DD | 8                  |
</Accordion>

<Accordion title="Example Query">
  **Query with partition filter**

  ```sql theme={null}
  SELECT *
  FROM `tt-contracts.osmosis_v1_osmosis.Transfer_transfer_event`
  WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
  LIMIT 100
  ```
</Accordion>

***
