# Hourly Exports

**Types:** Decimal values in raw exports are stored as strings to preserve precision.

### Changelog

| Date       | Change                                                                                                                                                                                                               |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 2026-01-12 | Oracle prices: added `mark_px_2` column for second mark price input from setOracle. Currently not relevant for HyENA as only 1 mark price is pushed per update, but added for completeness in case they ever push 2. |
| 2026-01-07 | Foundational exports: skip markets with empty orderbooks (previously resulted in null values for best bid/ask prices and sizes)                                                                                      |
| 2026-01-07 | Foundational exports: fixed bug where triggered orders resting in the book were omitted                                                                                                                              |

***

### Funding Per User

**File:** `{HH}_funding_per_user.parquet`

Aggregated funding activity per user for the hour.

| Field               | Type   | Description                                                |
| ------------------- | ------ | ---------------------------------------------------------- |
| `user`              | string | Wallet address                                             |
| `total_abs_funding` | f64    | Sum of absolute funding (total activity)                   |
| `net_funding`       | f64    | Net funding (+received, -paid)                             |
| `avg_funding_rate`  | f64?   | Effective funding rate (net funding / total position size) |
| `event_count`       | u32    | Number of funding events                                   |

***

### Liquidations Per User

**File:** `{HH}_liquidations_per_user.parquet`

Aggregated liquidations per user for the hour.

| Field                       | Type   | Description                         |
| --------------------------- | ------ | ----------------------------------- |
| `user`                      | string | Liquidated user address             |
| `total_notional`            | f64    | Total notional liquidated (px × sz) |
| `long_notional_liquidated`  | f64    | Long positions liquidated           |
| `short_notional_liquidated` | f64    | Short positions liquidated          |
| `liquidation_count`         | u32    | Number of liquidation fills         |

***

### Raw Fills

Individual fill events. Separate exports per fill type:

| Type                    | File                                         |
| ----------------------- | -------------------------------------------- |
| Perp                    | `{HH}_fills.parquet`                         |
| Spot                    | `{HH}_spot_fills.parquet`                    |
| Builder                 | `{HH}_builder_fills.parquet`                 |
| Liquidation             | `{HH}_liquidation_fills.parquet`             |
| TWAP                    | `{HH}_twap_fills.parquet`                    |
| HLPe Counterparty Taker | `{HH}_hlpe_counterparty_taker_fills.parquet` |

| Field                 | Type    | Description                                                                                          |
| --------------------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `coin`                | string  | Trading pair                                                                                         |
| `px`                  | string  | Fill price                                                                                           |
| `sz`                  | string  | Fill size                                                                                            |
| `side`                | string  | B / S                                                                                                |
| `time`                | i64     | Timestamp (ms)                                                                                       |
| `start_position`      | string  | Position before fill                                                                                 |
| `dir`                 | string  | Open / Close                                                                                         |
| `closed_pnl`          | string  | Realized PnL                                                                                         |
| `hash`                | string  | Tx hash                                                                                              |
| `oid`                 | u64     | Order ID                                                                                             |
| `crossed`             | bool    | Taker (true) / Maker (false)                                                                         |
| `fee`                 | string  | Fee amount                                                                                           |
| `tid`                 | u64     | Trade ID                                                                                             |
| `cloid`               | string? | Client order ID                                                                                      |
| `fee_token`           | string  | Fee token                                                                                            |
| `user`                | string  | User address                                                                                         |
| `builder`             | string? | Builder address                                                                                      |
| `builder_fee`         | string? | Builder fee                                                                                          |
| `deployer_fee`        | string? | Deployer fee (HIP-3 only). Column present from 2026-03-21 onwards; earlier files may not include it. |
| `priority_gas`        | string? | Priority gas fee in HYPE. Column present from 2026-04-13 onwards; earlier files may not include it.  |
| `twap_id`             | u64?    | TWAP ID                                                                                              |
| `tx_index`            | u32     | Tx index in block                                                                                    |
| `liquidation_user`    | string? | Liquidated user                                                                                      |
| `liquidation_mark_px` | string? | Mark px at liquidation                                                                               |
| `liquidation_method`  | string? | Liquidation method                                                                                   |

**Spot fills only** (additional fields):

| Field          | Type   | Description                           |
| -------------- | ------ | ------------------------------------- |
| `base_symbol`  | string | Base token symbol (e.g., USDE, HYPE)  |
| `quote_symbol` | string | Quote token symbol (e.g., USDC, USDE) |

**HLPe Counterparty Taker fills only** (additional fields):

| Field                      | Type   | Description                                                                                 |
| -------------------------- | ------ | ------------------------------------------------------------------------------------------- |
| `fee_rate`                 | string | Fee rate %                                                                                  |
| `affiliate_id`             | string | Affiliate identifier (filled with user of the fill for now. If empty not an affiliate fill) |
| `affiliate_fee_amount`     | string | Affiliate fee amount                                                                        |
| `net_fee_after_affiliates` | string | Net fee after affiliate share                                                               |

***

### Raw Oracle Prices

**File:** `{HH}_oracle_prices.parquet`

Oracle and mark price snapshots.

| Field         | Type    | Description                                  |
| ------------- | ------- | -------------------------------------------- |
| `time`        | i64     | Timestamp (ms)                               |
| `dex`         | string  | DEX identifier                               |
| `coin`        | string  | Trading pair                                 |
| `oracle_px`   | string? | Oracle price                                 |
| `mark_px`     | string? | Mark price (first input)                     |
| `mark_px_2`   | string? | Mark price (second input) — added 2026-01-12 |
| `ext_perp_px` | string? | External perp price                          |

***

### Raw Ledger (USDE Transfers)

**File:** `{HH}_usde_ledger_events.parquet`

USDE transfer events.

| Field          | Type   | Description                        |
| -------------- | ------ | ---------------------------------- |
| `time`         | i64    | Timestamp                          |
| `hash`         | string | Tx hash                            |
| `event_type`   | string | SpotTransfer/Send/RewardsClaim/etc |
| `from_address` | string | Sender address                     |
| `from_dex`     | string | Sender DEX                         |
| `to_address`   | string | Recipient address                  |
| `to_dex`       | string | Recipient DEX                      |
| `amount`       | string | Transfer amount                    |
| `fee`          | string | Fee amount                         |

***

### Raw TWAP Statuses

**File:** `{HH}_twap_statuses.parquet`

TWAP order status updates.

| Field            | Type   | Description        |
| ---------------- | ------ | ------------------ |
| `time`           | i64    | Timestamp (ms)     |
| `block_number`   | u64    | Block number       |
| `tx_index`       | u32    | Tx index           |
| `twap_id`        | u64    | TWAP ID            |
| `user`           | string | User address       |
| `coin`           | string | Trading pair       |
| `side`           | string | Buy / Sell         |
| `sz`             | string | Total size         |
| `executed_sz`    | string | Executed size      |
| `executed_ntl`   | string | Executed notional  |
| `minutes`        | u32    | Duration (minutes) |
| `reduce_only`    | bool   | Reduce-only flag   |
| `randomize`      | bool   | Randomization flag |
| `twap_timestamp` | u64    | Creation timestamp |
| `status`         | string | TWAP status        |
| `is_error`       | bool   | Error flag         |

***

### Raw Funding Events

**File:** `{HH}_funding_events.parquet`

Individual funding events.

| Field            | Type   | Description          |
| ---------------- | ------ | -------------------- |
| `time`           | i64    | Timestamp (ms)       |
| `user`           | string | User address         |
| `coin`           | string | Trading pair         |
| `funding_amount` | string | Funding amount (+/-) |
| `position_size`  | string | Position size        |
| `funding_rate`   | string | Funding rate         |

***

### Raw Orders

Order events. Separate exports:

| Type    | File                          |
| ------- | ----------------------------- |
| All     | `{HH}_orders.parquet`         |
| Builder | `{HH}_builder_orders.parquet` |

| Field               | Type    | Description                 |
| ------------------- | ------- | --------------------------- |
| `order_time`        | u64     | Submission time (ms)        |
| `user`              | string  | User address                |
| `hash`              | string? | Tx hash                     |
| `builder`           | string? | Builder address             |
| `builder_fee`       | u64?    | Builder fee                 |
| `status`            | string  | filled/canceled/resting/etc |
| `tx_index`          | u32     | Tx index                    |
| `coin`              | string  | Trading pair                |
| `side`              | string  | B / S                       |
| `limit_px`          | string  | Limit price                 |
| `sz`                | string  | Order size                  |
| `oid`               | u64     | Order ID                    |
| `timestamp`         | u64     | Order timestamp             |
| `trigger_condition` | string  | Trigger condition           |
| `is_trigger`        | bool    | Is triggered order          |
| `trigger_px`        | string  | Trigger price               |
| `is_position_tpsl`  | bool    | Position TP/SL              |
| `reduce_only`       | bool    | Reduce-only flag            |
| `order_type`        | string  | Order type                  |
| `orig_sz`           | string  | Original size               |
| `tif`               | string? | Time in force               |
| `cloid`             | string? | Client order ID             |
| `children`          | string? | Child orders (JSON)         |

***

### Raw Book Diffs

**File:** `{HH}_book_diffs.parquet`

Orderbook changes (new orders, updates, removals).

| Field          | Type    | Description           |
| -------------- | ------- | --------------------- |
| `time`         | i64     | Timestamp (ms)        |
| `block_number` | u64     | Block number          |
| `tx_index`     | u32     | Tx index              |
| `user`         | string  | User address          |
| `oid`          | u64     | Order ID              |
| `coin`         | string  | Trading pair          |
| `side`         | string  | bid / ask             |
| `px`           | string  | Price level           |
| `diff_type`    | string  | new / update / remove |
| `sz`           | string? | Current size          |
| `orig_sz`      | string? | Original size         |
| `new_sz`       | string? | New size after update |

***

### Foundational Per Contract

**File:** `{HH}_foundational_per_contract.parquet`

Per-second market snapshots aggregated at the contract level.

**Notes:**

* `volume` null means the service restarted, `volume` 0 means no volume in snapshot period
* When `open_interest` is 0, `mark_price` and `oracle_price` may not be reliable as the market is likely delisted
* `open_interest`, `oracle_price`, `best_bid_price`, `best_ask_price`, `best_bid_size`, and `best_ask_size` are aligned on block level
* `mark_price` is aligned on block level for native perp dex. Exception: HIP3 dexes — exact block alignment is infeasible due to calculation method. We monitor the setOracle event that triggers mark price updates and instantly fetch from the internal node API. Should be exactly aligned except in rare cases where the node is catching up after being out of sync in that case it might be in front by a couple of updates. Should not happen much especially on our production node but we will monitor this.

| Field            | Type               | Description                    |
| ---------------- | ------------------ | ------------------------------ |
| `timestamp`      | datetime\[ms, UTC] | Snapshot timestamp             |
| `dex`            | string             | DEX identifier                 |
| `market`         | string             | Market symbol (BTC, ETH, etc.) |
| `best_bid_price` | decimal            | Best bid price                 |
| `best_ask_price` | decimal            | Best ask price                 |
| `best_bid_size`  | decimal            | Size at best bid               |
| `best_ask_size`  | decimal            | Size at best ask               |
| `oracle_price`   | decimal            | Oracle price                   |
| `mark_price`     | decimal            | Mark price                     |
| `open_interest`  | decimal            | Total open interest            |
| `volume`         | decimal            | Volume in snapshot period      |

***

### Foundational Per Address

**File:** `{HH}_foundational_per_address.parquet`

Per-second market snapshots broken down by address, showing each user's orderbook contribution.

**Notes:**

* Users providing less than $1k total liquidity (bids + asks) are filtered out
* Depth is measured from mark price, which can be eg below best bid in certain market conditions

| Field                 | Type               | Description                                    |
| --------------------- | ------------------ | ---------------------------------------------- |
| `timestamp`           | datetime\[ms, UTC] | Snapshot timestamp                             |
| `dex`                 | string             | DEX identifier                                 |
| `market`              | string             | Market symbol (BTC, ETH, etc.)                 |
| `address`             | string             | User wallet address                            |
| `best_bid_price`      | decimal            | User's best bid price                          |
| `best_ask_price`      | decimal            | User's best ask price                          |
| `best_bid_size`       | decimal            | User's size at best bid                        |
| `best_ask_size`       | decimal            | User's size at best ask                        |
| `bid_depth_2bps`      | decimal            | User's bid depth within 2 bps from mark price  |
| `bid_depth_5bps`      | decimal            | User's bid depth within 5 bps from mark price  |
| `bid_depth_10bps`     | decimal            | User's bid depth within 10 bps from mark price |
| `bid_depth_25bps`     | decimal            | User's bid depth within 25 bps from mark price |
| `bid_depth_25_500bps` | decimal            | User's bid depth 25-500 bps from mark price    |
| `ask_depth_2bps`      | decimal            | User's ask depth within 2 bps from mark price  |
| `ask_depth_5bps`      | decimal            | User's ask depth within 5 bps from mark price  |
| `ask_depth_10bps`     | decimal            | User's ask depth within 10 bps from mark price |
| `ask_depth_25bps`     | decimal            | User's ask depth within 25 bps from mark price |
| `ask_depth_25_500bps` | decimal            | User's ask depth 25-500 bps from mark price    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hydromancer.xyz/readme/hyena/data-export-overview/hourly-exports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
