# perpscreener

> A Rust service that streams perpetual-futures market data and chart-pattern detections over HTTP and Server-Sent Events.

- Canonical: https://ashwinravikumar.com/projects/perpscreener
- Role: Sole author.
- Stack: Rust (axum); React and TypeScript frontend
- Data: Hyperliquid public candle data, 14 intervals from one minute to one month
- Link (github.com/0xashrk/perpscreener): https://github.com/0xashrk/perpscreener

## What it does

perpscreener watches perpetual futures markets and streams what it sees: price charts, VWAP and detected chart patterns such as double tops. Every endpoint has a streaming twin, so a dashboard or an agent can subscribe instead of polling.

## How it works

- Background monitors pull Hyperliquid's public candle data and keep shared state current.
- HTTP endpoints for health, charts, patterns, advanced patterns and VWAP, each with a Server-Sent Events stream.
- Streams send snapshots with keep-alives; the VWAP stream also sends heartbeats and resumes from the last event ID after a reconnect.
- OpenAPI and Swagger UI are built in, and the snapshot is kept current with openapi-snapshot.
- The frontend has a screener table and a pattern view fed by the streams.

## Run it

```
cargo run
cd frontend && bun install && bunx vite
```
