polymarket-edge

Trade and analyse Polymarket prediction markets with a 5-minute BTC EMA crossover strategy. Browse markets, read order books, run signals, manage a live auto-trader, and view portfolio positions. Billed per-call via SkillPay.me (0.001 USDT / call, BNB Chain USDT).

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "polymarket-edge" with this command: npx skills add icloud-git/polymarket-edge

Polymarket Edge

A locally-running FastAPI skill that wraps the Polymarket Gamma + CLOB APIs with a built-in EMA(5/20) crossover strategy and SkillPay.me billing.

Setup

# Install dependencies
pip install -r requirements.txt

# Set required environment variables
export SKILL_BILLING_API_KEY=sk_your_skillpay_api_key_here
export SKILL_ID=polymarket-edge

# Start the skill server (port 8080)
python main.py

The interactive docs are available at http://localhost:8080/docs.

Environment variables

VariableRequiredDescription
SKILL_BILLING_API_KEYFrom your skillpay.me dashboard
SKILL_IDYour skill slug, e.g. polymarket-edge
POLYMARKET_PRIVATE_KEYoptionalEVM private key for live order placement

Billing

Every billed endpoint requires ?user_id=<id> in the query string. If the user has no tokens the API returns HTTP 402 with a top_up_url.

GET  /balance?user_id=alice          → current token balance
GET  /topup?user_id=alice&amount=10  → BNB Chain USDT payment link

1 USDT = 1 000 tokens · 1 call = 1 token · min top-up 8 USDT · SkillPay takes 5 %

Key endpoints (all require ?user_id=)

Market data

GET /markets/search?q=bitcoin    Search all Polymarket markets
GET /markets/btc                 List active BTC/Bitcoin markets
GET /market/{id}                 Single market details
GET /market/{token_id}/book      Full order book (bids + asks)
GET /market/{token_id}/price     Mid-price, spread, implied probability
GET /market/{token_id}/history   5-min OHLCV candles

Strategy signals

POST /signal                     Run EMA crossover on top BTC markets
                                 Returns BUY_YES / BUY_NO / HOLD / SKIP per market

Auto-trader

GET  /autotrader/status          Is the auto-trader running?
POST /autotrader/start           Start 5-min BTC cycle (background task)
POST /autotrader/stop            Stop auto-trader
GET  /autotrader/log             Last 50 trade log entries

Portfolio

GET /portfolio?wallet=0x...      Open positions + USD value for a wallet

Strategy logic

  • Candles: 5-minute YES-token price history from Polymarket CLOB
  • Signal: EMA(5) crosses above EMA(20) → BUY_YES; crosses below → BUY_NO
  • Filters: skip if spread > 0.05 or YES price outside [0.15, 0.85]
  • Live trading: set ?auto_trade=true on /autotrader/start (requires POLYMARKET_PRIVATE_KEY + py-clob-client)

Live trading (optional)

pip install py-clob-client
export POLYMARKET_PRIVATE_KEY=0x<your_burner_wallet>
# Then uncomment the py-clob-client block in polymarket_client.py
curl -X POST "http://localhost:8080/autotrader/start?user_id=alice&auto_trade=true"

⚠️ Use a burner wallet. Never commit your private key.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Allergy

Take control of Allergy with this health & wellness toolkit. Clean interface, local storage, zero configuration.

Registry SourceRecently Updated
General

wps_office_auto_skill

本地办公自动化,支持文档生成与润色,合同审查,表格清洗与分析,PPT制作,PDF转换与批量处理。

Registry SourceRecently Updated
General

Encrypt

Encrypt - command-line tool for everyday use

Registry SourceRecently Updated
General

Succession Plan

继任计划。关键岗位识别、人才评估、发展路径、过渡方案、知识转移、紧急继任。Succession planning. 继任、人才管理。

Registry SourceRecently Updated