Polymarket Trader

Build and analyze a BTC 1h Up/Down trading strategy anchored to Binance BTCUSDT, applying edge thresholds, regime filters, and detailed trade validation.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
5 · 3.4k · 16 current installs · 19 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
The name, SKILL.md, references/strategy.md, and the three Python scripts consistently implement a Polymarket BTC 1h Up/Down analysis flow anchored to Binance market data. All network requests go to Binance public APIs, which is expected for this purpose.
Instruction Scope
SKILL.md instructs the agent to compute fair probabilities, run bundled scripts, and validate fills. The scripts read a local events.jsonl file (paperbot state) to explain fills — this is expected, but it means the skill will access your local trading history (workspace/polymarket_paperbot/state/events.jsonl by default). Confirm you are comfortable with the skill reading those files before running.
Install Mechanism
No install spec — instruction-only plus bundled scripts. Nothing is downloaded from third-party or personal servers; scripts are included in the bundle. This minimizes install-time risk.
Credentials
The skill requests no environment variables or credentials (appropriate). It does make outbound HTTPS calls to Binance public endpoints (expected). There are no hidden endpoints or secret exfiltration attempts in the provided code. One operational caveat: scripts import dateutil (dateutil.parser) but the package is not declared in metadata; you must ensure the runtime has that dependency.
Persistence & Privilege
The skill is not always-enabled and does not request elevated or persistent system privileges. It does read a local events.jsonl file in the workspace (expected behavior) but does not modify other skills or global agent settings.
Assessment
This skill appears to do exactly what it says: read your PaperBot events file and annotate fills using public Binance data. Before installing/running: 1) Review and confirm the script will read the local events.jsonl path — the default in explain_fills.py points to a user-specific Windows path (C:\Users\domin\...); update it to the correct workspace path to avoid accidental file reads. 2) Ensure the Python runtime includes dependencies (python-dateutil is imported but not declared). 3) Remember the scripts call Binance public APIs (rate limits apply and network access is required). 4) If you will run this against live trading or real money, audit the code yourself (or run in a sandbox) because it will read your local trading history and produce trading signals; nothing in the files attempts to exfiltrate secrets, but local data exposure is possible. 5) If you want stricter isolation, run the scripts locally on a machine you control or inspect/clean the code to your satisfaction before use.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk973cey2ba8wyxgjkya7ht703x80ehpm

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Polymarket Trader

Maintain a profitable BTC 1h Up/Down strategy by anchoring decisions to Binance BTCUSDT (the resolution source) and enforcing anti-churn/risk rules.

Workflow (use this order)

  1. Confirm the market type
  • This skill is optimized for bitcoin-up-or-down-* 1h markets (Binance 1H open vs close).
  1. Compute the anchor signal (Binance)
  • Fetch 1m closes + the 1h open for the relevant hour.
  • Compute volatility (sigma) and time-to-expiry.
  • Convert to fair probability for Up/Down.
  1. Trade only when there is measurable edge
  • Enter only if edge = fair_prob - market_price exceeds a threshold.
  • Add a directional guardrail: do not bet against the sign of the move when |z| is non-trivial.
  1. Exit using the right logic for the entry mode
  • Model entries: exit on edge decay / model flip; hold to preclose when confidence is extreme.
  • Mean-reversion entries: exit on reversion targets (not model-tp), with strict churn limits.
  1. Validate with logs
  • Every suspected “nonsense trade” must be explained via:
    • reason / entry_mode
    • Binance-derived fair probability + z
    • whether the correct exit block fired

Bundled scripts

All scripts are designed to be run from the OpenClaw workspace.

1) Fetch Binance klines

  • {baseDir}/scripts/binance_klines.py
    • Pulls klines and prints JSON.

2) Dump/stabilization and regime metrics

  • {baseDir}/scripts/binance_regime.py
    • Computes ret5/ret15/slope10 + simple “stabilized” boolean.

3) Explain fills (events.jsonl) with Binance context

  • {baseDir}/scripts/explain_fills.py
    • Reads paperbot events.jsonl and prints a concise table for the last N fills:
      • side/outcome/px/reason
      • estimated fair_up + z
      • “against trend?” flag

References

  • {baseDir}/references/strategy.md — the math model, parameters, and tuning checklist.

Files

5 total
Select a file
Select a file to preview.

Comments

Loading comments…