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

# Prediction Markets

> Use the Artemis Python SDK to fetch prediction market data for Kalshi, Polymarket, and more

## Install

```bash theme={null}
pip install artemis==0.1.1
```

## Setup

```bash theme={null}
export ARTEMIS_API_KEY="your_key_here"
```

## Example: Fetch Spot Volume for Kalshi and Polymarket

```python theme={null}
from artemis import Artemis

client = Artemis()  # reads ARTEMIS_API_KEY from env

response = client.fetch_metrics(
    metric_names="spot_volume",
    symbols="kalshi,polymarket",
    start_date="2026-03-01",
    end_date="2026-03-27",
)

data = response.model_dump()
for platform in ["kalshi", "polymarket"]:
    daily = data["data"]["symbols"][platform]["spot_volume"]
    total = sum(d["val"] for d in daily if d["val"])
    print(f"{platform}: ${total/1e6:,.0f}M total volume")
```

## Response Format

Each platform returns an array of `{date, val}` objects:

```json theme={null}
{
  "data": {
    "symbols": {
      "kalshi": {
        "spot_volume": [
          {"date": "2026-03-20", "val": 520619009.0},
          {"date": "2026-03-21", "val": 502850870.0}
        ]
      },
      "polymarket": {
        "spot_volume": [
          {"date": "2026-03-20", "val": 336191967.57},
          {"date": "2026-03-21", "val": 368044996.98}
        ]
      }
    }
  }
}
```

## Fetching Multiple Metrics

```python theme={null}
response = client.fetch_metrics(
    metric_names="spot_volume,open_interest,spot_dau",
    symbols="kalshi,polymarket,opinion",
    start_date="2026-03-01",
    end_date="2026-03-27",
)
```

## Available Prediction Market Symbols

| Symbol       | Platform   |
| ------------ | ---------- |
| `kalshi`     | Kalshi     |
| `polymarket` | Polymarket |
| `opinion`    | Opinion    |
| `drift`      | Drift      |

## Available Metrics

| Metric          | Description          |
| --------------- | -------------------- |
| `spot_volume`   | Daily trading volume |
| `open_interest` | Open interest        |
| `spot_txns`     | Transaction count    |
| `spot_dau`      | Daily active users   |
| `fees`          | Protocol fees        |
| `tvl`           | Total value locked   |

## More Information

* [API Examples](/artemis-api/api-examples)
* [List Supported Assets](https://www.artemis.ai/docs/api-reference/core-artemis-assets/list-supported-assets)
