> ## 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.

# vertex_v1_base

> Tables in tt-contracts.vertex_v1_base

## Tables

### OffchainExchange\_FillOrder\_event

Off-chain exchange order fill events recording executed trades with subaccount balances, order parameters, and settlement deltas. Contains base and quote asset changes, execution price with 18-decimal precision, maker/taker designation, order digest for verification, and product identifier for trading pairs.

<Accordion title="Columns">
  | Column             | Type        | Description                                                                                                                                                                   |
  | ------------------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `block_timestamp`  | `TIMESTAMP` | Timestamp when the block was produced. UTC timezone, millisecond precision.                                                                                                   |
  | `block_number`     | `INT64`     | Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block's position in the blockchain.                          |
  | `transaction_hash` | `STRING`    | Unique identifier for the transaction. 66-character hex string including 0x prefix.                                                                                           |
  | `log_index`        | `INT64`     | Position of the event within the block's transaction logs. Zero-indexed integer representing the sequential order of log emission.                                            |
  | `address`          | `STRING`    | Contract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.                                                                                       |
  | `removed`          | `BOOL`      | Boolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.                                                                  |
  | `in_productId`     | `STRING`    | Identifier for the financial product or trading pair involved in the transaction. Numeric string representation of the product ID in the protocol's internal indexing system. |
  | `in_digest`        | `STRING`    | Cryptographic hash of the order being filled. 66-character hex string including 0x prefix.                                                                                    |
  | `in_subaccount`    | `STRING`    | Subaccount identifier for the order participant. 66-character hex string including 0x prefix, encoding both the wallet address and subaccount name.                           |
  | `in_priceX18`      | `STRING`    | Execution price for the order scaled by 10^18. Numeric string representation of the price with 18 decimal places of precision.                                                |
  | `in_amount`        | `STRING`    | Input amount for the swap, transaction, or operation. Numeric string representation of token quantity in smallest denomination.                                               |
  | `in_expiration`    | `STRING`    | Order expiration timestamp. Unix timestamp in seconds, or 0 for orders without expiration.                                                                                    |
  | `in_nonce`         | `STRING`    | Unique numeric identifier for an order, transaction, or operation used to prevent replay attacks. Numeric string representation without leading zeros.                        |
  | `in_isTaker`       | `BOOL`      | Boolean flag indicating whether the order was executed as a taker order in the exchange match.                                                                                |
  | `in_feeAmount`     | `STRING`    | Fee amount charged for the flash loan or transaction. Numeric string representation of fee quantity in smallest denomination.                                                 |
  | `in_baseDelta`     | `STRING`    | Change in base asset quantity for the order fill. Numeric string representation in smallest denomination, positive for buys and negative for sells.                           |
  | `in_quoteDelta`    | `STRING`    | Change in quote asset quantity for the order fill. Numeric string representation in smallest denomination, negative when buying base and positive when selling base.          |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | in\_nonce           | in\_amount             | in\_digest                                                         | log\_index | in\_isTaker | in\_priceX18        | block\_number | in\_baseDelta          | in\_feeAmount      | in\_productId | in\_expiration       | in\_quoteDelta         | in\_subaccount                                                     | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------- | ------------------- | ---------------------- | ------------------------------------------------------------------ | ---------- | ----------- | ------------------- | ------------- | ---------------------- | ------------------ | ------------- | -------------------- | ---------------------- | ------------------------------------------------------------------ | ------------------------ | ------------------------------------------------------------------ |
  | 0xd0899a1235771733e89b674633981e422aa45b1a | false   | 0                   | -130000000000000000000 | 0xec32c7a972202dfc8cae313b0826690a6071d81f95b227553a8e4af5dc60b124 | 419        | false       | 2404200000000000000 | 21443774      | -130000000000000000000 | 0                  | 104           | 0                    | 312546000000000000000  | 0x0000000000000000000000000000000000000000000000000000000000000001 | 2024-10-23T09:48:15.000Z | 0x65ebfe872162d4286d2c1f7f94526f1bca8f50c14b26b0a3f951736793db03d6 |
  | 0xd0899a1235771733e89b674633981e422aa45b1a | false   | 0                   | -240000000000000000000 | 0x779c34bc68afe5ba0da27482ab07dbf920ac705e3300988dc26ab458acb022c9 | 417        | false       | 2404100000000000000 | 21443774      | -240000000000000000000 | 0                  | 104           | 0                    | 576984000000000000000  | 0x0000000000000000000000000000000000000000000000000000000000000001 | 2024-10-23T09:48:15.000Z | 0x65ebfe872162d4286d2c1f7f94526f1bca8f50c14b26b0a3f951736793db03d6 |
  | 0xd0899a1235771733e89b674633981e422aa45b1a | false   | 1813697060553097572 | 370000000000000000000  | 0xcb3ad1a4567e4db5850c87f4db505eb781b3f23eaf19901773a365cbe91af67b | 418        | true        | 2423000000000000000 | 21443774      | 240000000000000000000  | 115419883976795359 | 104           | 11529216775744685485 | -577099419883976795359 | 0xee33e09ae46d84587a8a89bb7a74e70f8961058b64656661756c740000000000 | 2024-10-23T09:48:15.000Z | 0x65ebfe872162d4286d2c1f7f94526f1bca8f50c14b26b0a3f951736793db03d6 |
</Accordion>

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

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

***

### OffchainExchange\_Initialized\_event

Contract initialization events for the Vertex protocol OffchainExchange contract, capturing version information and deployment metadata. Emitted once per contract deployment to mark the contract's operational state activation.

<Accordion title="Columns">
  | Column             | Type        | Description                                                                                                                                          |
  | ------------------ | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `block_timestamp`  | `TIMESTAMP` | Timestamp when the block was produced. UTC timezone, millisecond precision.                                                                          |
  | `block_number`     | `INT64`     | Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block's position in the blockchain. |
  | `transaction_hash` | `STRING`    | Unique identifier for the transaction. 66-character hex string including 0x prefix.                                                                  |
  | `log_index`        | `INT64`     | Position of the event within the block's transaction logs. Zero-indexed integer representing the sequential order of log emission.                   |
  | `address`          | `STRING`    | Contract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.                                                              |
  | `removed`          | `BOOL`      | Boolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.                                         |
  | `in_version`       | `INT64`     | Version identifier for the contract or event schema. String or integer value indicating the initialization or state version.                         |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | log\_index | in\_version | block\_number | block\_timestamp         | transaction\_hash                                                  |
  | ------------------------------------------ | ------- | ---------- | ----------- | ------------- | ------------------------ | ------------------------------------------------------------------ |
  | 0xd0899a1235771733e89b674633981e422aa45b1a | false   | 4          | 1           | 19343721      | 2024-09-04T19:06:29.000Z | 0x5e1a8d7219fec12b875aced230fa882ad43e52ebd9b84a8284b213044c0857c4 |
</Accordion>

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

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

***

### OffchainExchange\_OwnershipTransferred\_event

Ownership transfer events from OffchainExchange contracts recording changes in contract ownership. Contains previous owner, new owner addresses, and transaction metadata for tracking administrative control transitions.

<Accordion title="Columns">
  | Column             | Type        | Description                                                                                                                                          |
  | ------------------ | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `block_timestamp`  | `TIMESTAMP` | Timestamp when the block was produced. UTC timezone, millisecond precision.                                                                          |
  | `block_number`     | `INT64`     | Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block's position in the blockchain. |
  | `transaction_hash` | `STRING`    | Unique identifier for the transaction. 66-character hex string including 0x prefix.                                                                  |
  | `log_index`        | `INT64`     | Position of the event within the block's transaction logs. Zero-indexed integer representing the sequential order of log emission.                   |
  | `address`          | `STRING`    | Contract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.                                                              |
  | `removed`          | `BOOL`      | Boolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.                                         |
  | `in_previousOwner` | `STRING`    | Address of the prior owner in an ownership transfer event. Hex-encoded, 0x-prefixed, 42-character string.                                            |
  | `in_newOwner`      | `STRING`    | Address of the newly assigned owner in an ownership transfer event. Hex-encoded, 0x-prefixed, 42-character string.                                   |
</Accordion>

<Accordion title="Sample Data">
  | address                                    | removed | log\_index | in\_newOwner                               | block\_number | block\_timestamp         | in\_previousOwner                          | transaction\_hash                                                  |
  | ------------------------------------------ | ------- | ---------- | ------------------------------------------ | ------------- | ------------------------ | ------------------------------------------ | ------------------------------------------------------------------ |
  | 0xd0899a1235771733e89b674633981e422aa45b1a | false   | 0          | 0x4dfdffae13ca8bfc339398b586dcc1cac14beb80 | 19383555      | 2024-09-05T17:14:17.000Z | 0xece5f68e5fae5cff2f231c185ac4db83d50abe0c | 0x669db89d6cf30e206195d552690eef89146b0e1882ea3baa6129bf5bf5406ae4 |
  | 0xd0899a1235771733e89b674633981e422aa45b1a | false   | 3          | 0xece5f68e5fae5cff2f231c185ac4db83d50abe0c | 19343721      | 2024-09-04T19:06:29.000Z | 0x0000000000000000000000000000000000000000 | 0x5e1a8d7219fec12b875aced230fa882ad43e52ebd9b84a8284b213044c0857c4 |
</Accordion>

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

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

***
