Metadata-Version: 2.4
Name: zrovio-venues
Version: 0.1.0
Summary: Polymarket + Kalshi venue adapters (market data and order clients) for Zrovio
Author: Zrovio
License: Proprietary
Project-URL: Homepage, https://github.com/zrovio/arb-poc1
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.32
Requires-Dist: python-dotenv>=1.0
Requires-Dist: cryptography>=42
Requires-Dist: websockets>=12
Provides-Extra: poly
Requires-Dist: py_clob_client_v2>=1.0.1; extra == "poly"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"

# zrovio-venues

Polymarket + Kalshi venue adapters used by Zrovio bots.

## Install

From the monorepo (editable):

```bash
pip install -e packages/zrovio-venues
# optional: Polymarket live order signing
pip install -e "packages/zrovio-venues[poly]"
```

## Usage

```python
from zrovio_venues.clock import now_utc
from zrovio_venues.polymarket import fetch_15m_markets, PolyMarketFeed
from zrovio_venues.kalshi import KalshiClient
from zrovio_venues.polymarket_orders import PolyOrderClient
from zrovio_venues.kalshi_orders import KalshiOrderClient

poly_mkts = fetch_15m_markets(["btc", "eth"])
kalshi = KalshiClient.from_env()
kal_mkts = kalshi.fetch_15m_markets(["btc", "eth"])
poly_orders = PolyOrderClient.from_env(dry_run=True)
kal_orders = KalshiOrderClient.from_env(dry_run=True)
```

5-minute Polymarket discovery lives in `zrovio_venues.poly_5m`.

## Fallback when the package is unavailable

Bots in this repo still keep the flat root modules (`clock.py`, `polymarket_client.py`, …).
If `zrovio-venues` is missing from the environment (pip uninstall, broken wheel, etc.),
prefer importing the package and falling back to the local copies:

```python
try:
    from zrovio_venues.clock import now_utc
    from zrovio_venues.polymarket import fetch_15m_markets, PolyMarketFeed
    from zrovio_venues.kalshi import KalshiClient
    from zrovio_venues.polymarket_orders import PolyOrderClient
    from zrovio_venues.kalshi_orders import KalshiOrderClient
except ImportError:
    from clock import now_utc
    from polymarket_client import fetch_15m_markets, PolyMarketFeed
    from kalshi_client import KalshiClient
    from polymarket_orders import PolyOrderClient
    from kalshi_orders import KalshiOrderClient
```

Existing app code is **not** switched yet — migrate callers gradually.

## Tests

```bash
cd packages/zrovio-venues
pip install -e ".[dev]"
pytest
```
