> For the complete documentation index, see [llms.txt](https://docs.hydromancer.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hydromancer.xyz/reservoir/tradexyz.md).

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