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

# Extract parquet data

> Download dataset exports and analyze them locally with DuckDB or Polars

Use the data export endpoints to fetch presigned download URLs, then download and query the files locally.

## Supported datasets

* `rfqs`
* `mve_trades`

## Step 1: request export metadata

```bash theme={"theme":"one-dark-pro"}
curl -s -H "X-API-Key: $API_KEY" \
  "https://api.delphiterminal.co/api/v1/data/rfqs?date=2026-02-13" \
  > export.json
```

This response includes `parts`, where each part contains a temporary presigned `url`.

## Step 2: extract the presigned URL

```bash theme={"theme":"one-dark-pro"}
URL=$(jq -r '.parts[0].url' export.json)
echo "$URL"
```

## Step 3: download the parquet file

```bash theme={"theme":"one-dark-pro"}
curl -L "$URL" -o rfqs_2026-02-13.parquet
```

<Note>
  Presigned URLs expire quickly (typically 5 minutes). If the download fails, request fresh metadata and retry.
</Note>

## Step 4a: query with DuckDB

```bash theme={"theme":"one-dark-pro"}
duckdb -c "SELECT * FROM read_parquet('rfqs_2026-02-13.parquet') LIMIT 20;"
```

## Step 4b: query with Python (Polars)

```python theme={"theme":"one-dark-pro"}
import polars as pl

df = pl.read_parquet("rfqs_2026-02-13.parquet")
print(df.head())
print(df.shape)
```

## Latest data endpoint

To fetch today's dataset without passing a date:

```bash theme={"theme":"one-dark-pro"}
curl -s -H "X-API-Key: $API_KEY" \
  "https://api.delphiterminal.co/api/v1/data/rfqs/latest" \
  > latest.json
```
