analysis-poly
Real Profit (Fee-Excluded View)
中文说明见:README_zh.md
Polymarket market PnL analyzer with a web UI.
Scope (Important)
- The dashboard discovers markets from Polymarket user activity within the selected time range, then replays the matched markets.
- It is intended for Polymarket market analysis in general, including but not limited to crypto markets.
- Main purpose: quantify and visualize realized PnL, fee impact, market-level performance, and
Net PnLvsNo-Fee PnL.
Requirements
- Python
3.11+(recommended:3.11) uvpackage manager is optional for local development
Quick Start
pip install analysis-poly
analysis-poly-server --host 127.0.0.1 --port 8000
Open http://localhost:8000.
Local Install From Source
uv pip install .
# or
pip install .
Then start the web server with the same one-line command:
analysis-poly-server --host 127.0.0.1 --port 8000
For source checkout development, this also works:
uv sync
uv run python main.py
CLI Open + Auto Start
Use a standalone script to start server, open browser, and pass params in URL.
uv run -m analysis_poly.open_with_params \
--address 0xabc \
--keywords updown,15m \
--start-time "2026-03-01 00:00" \
--end-time "2026-03-02 00:00" \
--concurrency 8
Frontend will read query params, fill form fields, and auto start the run.
CLI Run Once
Use the synchronous CLI entry when you want a single final JSON payload on stdout without SSE or web UI:
analysis-poly-run \
--address 0xabc \
--keywords updown,15m \
--start-time "2026-03-01 00:00" \
--end-time "2026-03-02 00:00"
The command blocks until analysis finishes, writes report artifacts into output_dir, and prints:
{
"status": "COMPLETED",
"summary": { "...": "..." },
"artifacts": {
"json": "reports/...",
"total_curve_csv": "reports/...",
"market_curve_csv": "reports/..."
}
}
First Clone
analysis_poly/static/dist is committed in the repository, so first startup does not require front-end build.
If you modify frontend/src, rebuild assets:
npm install
npm run build
API
POST /api/runsGET /api/runs/{run_id}/stream(SSE)POST /api/runs/{run_id}/stopGET /api/runs/{run_id}/resultGET /api/runs/{run_id}/state
Test
uv run pytest
Frontend
- Source:
frontend/src - Build output:
analysis_poly/static/dist/app.jsandanalysis_poly/static/dist/app.css
Metadata
Release files for analysis-poly 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| analysis_poly-0.1.10.tar.gz | 743.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| analysis_poly-0.1.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / analysis_poly-0.1.10.tar.gz
| Download URL | analysis_poly-0.1.10.tar.gz |
|---|---|
| Size | 743.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e352f1ca301a750a82c26fe56439b98d97b43c91618c10c54b9b141670e60324
|
|
BLAKE2b-256 checksum How to use checksums |
22ac056be165f707196188c7efc1bb518608478f69ec27745992c2bed3f069cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / analysis_poly-0.1.10-py3-none-any.whl
| Download URL | analysis_poly-0.1.10-py3-none-any.whl |
|---|---|
| Size | 737.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8360fff055bea99287e2dca46a0bf1b531ac690186402d64944e4ab8bc842e67
|
|
BLAKE2b-256 checksum How to use checksums |
77a8f470949868aaf7f838551d65222b86f26f0dfdeef123334736d062756eec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|