Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arena Sniper — Polymarket Multi-Asset Bot

A delta-neutral trading bot for Polymarket 15-minute UP/DOWN crypto markets,

Project Structure

arena_sniper/
├── main.py                     ← Entry point — run this
├── requirements.txt
├── bot/
│   ├── config.py               ← All configuration constants
│   ├── state.py                ← Shared per-asset state dicts + update_state()
│   ├── trade_history.py        ← Persists completed trades to JSON
│   ├── risk.py                 ← RiskManager: daily halt, asset floors, correlation cap
│   ├── data.py                 ← Candle data, market finder, price fetching
│   ├── orders.py               ← DryRunSimulator, CLOB buy/sell, get_clob_client()
│   ├── ml.py                   ← MLEngine: Thompson Sampling contextual bandit
│   ├── signals.py              ← MomentumFilter + ConvictionEngine (RL-weighted)
│   ├── exit_logic.py           ← try_exit(), try_exit_best_side()
│   └── strategy.py             ← RegimeDetector, EntryScorer, BailLearner, run_asset()
└── dashboard/
    ├── dashboard_html.py       ← Arena Sniper-style HTML/JS dashboard
    └── server.py               ← HTTP server serving dashboard + /api/state

Quick Start

pip install -r requirements.txt
python main.py

Then open http://localhost:1012 in your browser.

Configuration (bot/config.py)

Key Default Description
FUNDER_ADDRESS placeholder Your Polygon wallet address (0x...)
PRIVATE_KEY placeholder Your private key
DRY_RUN True Set to False for live trading
BUY_AMOUNT 5.0 USD per leg (UP + DOWN = $10 total)
DASHBOARD_PORT 1012 Web dashboard port
EXIT_THRESHOLD 0.88 Base exit threshold (88¢)
DAILY_LOSS_LIMIT -3000.0 Portfolio halt threshold

Dashboard

The dashboard auto-updates every 750ms with:

  • Total equity curve (green line, Arena Sniper style)
  • Price action per asset (coloured lines)
  • Market feed sidebar with live UP/DOWN prices
  • Execution log sidebar with all trade events
  • Open positions bar showing live P&L per position
  • Asset tabs to filter chart by asset

Running in Trial Mode

If FUNDER_ADDRESS / PRIVATE_KEY are not set, the bot runs in TRIAL mode — all orders are simulated with the DryRunSimulator which models real spreads, fees, partial fills, and FOK rejection rates. "# prediction_bot"

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages