# Trade\[XYZ]

Indices, equities, and commodities perpetual markets. USDC-margined.

**Launch date:** October 2025\
**Data available from:** 2025-10-13 (complete history since launch)\
**Collateral token:** USDC\
**Example markets:** `xyz:MSFT`, `xyz:AAPL`, `xyz:NVDA`, `xyz:SP500`

## Datasets

**Bucket:** `s3://hydromancer-reservoir` (requester pays)

| Dataset                        | Path                                                                |
| ------------------------------ | ------------------------------------------------------------------- |
| **All fills**                  | `by_dex/xyz/fills/perp/all/date=YYYY-MM-DD/fills.parquet`           |
| **Liquidations**               | `by_dex/xyz/fills/perp/liquidations/date=YYYY-MM-DD/fills.parquet`  |
| **ADL**                        | `by_dex/xyz/fills/perp/adl/date=YYYY-MM-DD/fills.parquet`           |
| **Builder fills**              | `by_dex/xyz/fills/perp/builder_fills/date=YYYY-MM-DD/fills.parquet` |
| **TWAP fills**                 | `by_dex/xyz/fills/perp/twap_fills/date=YYYY-MM-DD/fills.parquet`    |
| **Candles**                    | `by_dex/xyz/candles/1s/date=YYYY-MM-DD/candles.parquet`             |
| **Perp positioning snapshots** | `by_dex/xyz/snapshots/perp/date=YYYY-MM-DD/*.parquet`               |

Sub-dataset files are only created for dates with data. If a file is missing, there were no events of that type on that date.

## Quick Start

```sql
INSTALL httpfs;
LOAD httpfs;
SET s3_region = 'ap-northeast-1';

-- MSFT fills for a day
SELECT timestamp, side, price, size, direction, address
FROM read_parquet('s3://hydromancer-reservoir/by_dex/xyz/fills/perp/all/date=2026-03-22/fills.parquet')
WHERE coin = 'xyz:MSFT'
ORDER BY timestamp;

-- All Trade[XYZ] volume by market
SELECT base_symbol, sum(price * size) as volume_usd, count(*) as trades
FROM read_parquet('s3://hydromancer-reservoir/by_dex/xyz/fills/perp/all/date=2026-03-22/fills.parquet')
GROUP BY base_symbol
ORDER BY volume_usd DESC;

-- 1-minute MSFT candles
SELECT time_bucket(INTERVAL '1 minute', timestamp) as minute,
       first(open) as open, max(high) as high,
       min(low) as low, last(close) as close, sum(volume) as volume
FROM read_parquet('s3://hydromancer-reservoir/by_dex/xyz/candles/1s/date=2026-03-22/candles.parquet')
WHERE coin = 'xyz:MSFT'
GROUP BY minute ORDER BY minute;
```

For schema details see: [Fills](/reservoir/schema-reference/fills.md) · [Candles](/reservoir/schema-reference/candles.md) · [Snapshots](/reservoir/schema-reference/snapshots.md)


---

# 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/reservoir/tradexyz.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.
