{"id":35463337,"url":"https://github.com/hunterjsb/pmt","last_synced_at":"2026-05-27T02:04:21.969Z","repository":{"id":330684671,"uuid":"1123581726","full_name":"hunterjsb/pmt","owner":"hunterjsb","description":"polymarket trader","archived":false,"fork":false,"pushed_at":"2026-01-04T08:46:07.000Z","size":211,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-13T22:59:45.603Z","etag":null,"topics":["arbitrage","bot","polymarket","trading"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hunterjsb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-27T07:08:17.000Z","updated_at":"2026-01-04T08:46:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hunterjsb/pmt","commit_stats":null,"previous_names":["hunterjsb/pmt"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/hunterjsb/pmt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunterjsb%2Fpmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunterjsb%2Fpmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunterjsb%2Fpmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunterjsb%2Fpmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hunterjsb","download_url":"https://codeload.github.com/hunterjsb/pmt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunterjsb%2Fpmt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28541070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arbitrage","bot","polymarket","trading"],"created_at":"2026-01-03T09:17:41.491Z","updated_at":"2026-05-27T02:04:21.956Z","avatar_url":"https://github.com/hunterjsb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pmt\n\n[![CI](https://github.com/hunterjsb/pmt/actions/workflows/ci.yml/badge.svg)](https://github.com/hunterjsb/pmt/actions/workflows/ci.yml)\n[![pmproxy](https://img.shields.io/github/v/release/hunterjsb/pmt?filter=pmproxy-*\u0026label=pmproxy)](https://github.com/hunterjsb/pmt/releases?q=pmproxy)\n[![pmengine](https://img.shields.io/github/v/release/hunterjsb/pmt?filter=pmengine-*\u0026label=pmengine)](https://github.com/hunterjsb/pmt/releases?q=pmengine)\n[![pmtrader](https://img.shields.io/github/v/release/hunterjsb/pmt?filter=pmtrader-*\u0026label=pmtrader)](https://github.com/hunterjsb/pmt/releases?q=pmtrader)\n\nPolymarket trading toolkit.\n\n```\npmtrader/   Python SDK + CLI\npmproxy/    Rust reverse proxy (Lambda live; EC2 binary as fallback)\npmengine/   Rust HFT trading engine\npmstrat/    Python strategy DSL + backtesting + transpiler to Rust\n```\n\n## Architecture\n\n```mermaid\nflowchart LR\n    subgraph Clients\n        CLI[\"pmt CLI\"]\n        BOT[\"Bots / Scripts\"]\n    end\n\n    subgraph PMT[\"pmtrader (Python)\"]\n        API[\"PolymarketAPI\"]\n        AUTH[\"Auth \u0026 Signing\"]\n    end\n\n    subgraph STRATDSL[\"pmstrat (Python)\"]\n        DSL[\"Strategy DSL\"]\n        TRANS[\"Transpiler\"]\n    end\n\n    subgraph ENGINE[\"pmengine (Rust)\"]\n        STRAT[\"Strategy Runtime\"]\n        ORDER[\"Order Manager\"]\n        RISK[\"Risk Manager\"]\n    end\n\n    DSL --\u003e TRANS\n    TRANS --\u003e|\"generates\"| STRAT\n\n    CLI --\u003e PMT\n    BOT --\u003e PMT\n\n    PMT --\u003e DECIDE{\"PMPROXY_URL?\"}\n\n    subgraph PROXY[\"pmproxy (Rust)\"]\n        LAMBDA[\"Lambda (eu-west-1)\"]\n    end\n\n    DECIDE --\u003e|set| PROXY\n    DECIDE --\u003e|unset| POLY\n\n    subgraph POLY[\"Polymarket\"]\n        CLOB[\"CLOB API\"]\n        GAMMA[\"Gamma API\"]\n        RPC[\"Polygon RPC\"]\n    end\n\n    PROXY --\u003e POLY\n    ENGINE --\u003e POLY\n```\n\n## pmtrader\n\n```bash\ncd pmtrader \u0026\u0026 uv sync\n```\n\n```bash\npmt --help                                                  # list subcommands\n\n# Symmetric buy/sell: REF is a polymarket URL/slug OR numeric token id.\npmt buy  https://polymarket.com/event/btc-updown-4h-1779825600 down --amount $910\npmt sell URL no --amount $50 --match Trump                  # URL ref + outcome\npmt buy  14658893069672317885... --price 0.92 --size 217    # token ref + explicit limit\n\npmt positions --orders                                      # portfolio + open orders + exposure\npmt pnl                                                     # realized 1d/7d/30d/all + unrealized\npmt rewards --days 7                                        # REWARD + YIELD income\npmt search pandemic                                         # cross-market search\npmt engine status                                           # local engine snapshot\npmt scan cliff                                              # opportunity scanners\n```\n\nSee [pmtrader/README.md](pmtrader/README.md) for the full CLI reference.\n\n### Config\n\n```bash\n# .env (for trading)\nPM_PRIVATE_KEY=0x...\nPM_FUNDER_ADDRESS=0x...\nPM_SIGNATURE_TYPE=1             # 0=EOA, 1=Poly Proxy, 2=EIP-1271\n\n# pmproxy (required to trade from a geoblocked region)\nPMPROXY_URL=https://\u003c...\u003e.lambda-url.eu-west-1.on.aws\nPMPROXY_USERNAME=...\nPMPROXY_PASSWORD=...\n```\n\n### Python SDK\n\n```python\nfrom polymarket import PolymarketAPI\n\napi = PolymarketAPI()\napi.place(\"buy\", token=..., price=0.93, size=217)\napi.flip(token=..., buy_price=0.09, sell_price=0.10, size=850)\napi.get_positions()\napi.search_markets(\"pandemic\")\n```\n\n## pmproxy\n\n```bash\ncd pmproxy \u0026\u0026 cargo build --release --features ec2\n./target/release/pmproxy\n```\n\nRoutes `/clob/*`, `/gamma/*`, `/chain/*` to Polymarket APIs.\n\nSee [pmproxy/README.md](pmproxy/README.md).\n\n## pmengine\n\n```bash\ncd pmengine \u0026\u0026 cargo build --release --features ec2\n./target/release/pmengine --dry-run\n```\n\n### Config\n\n```bash\n# .env\nPMENGINE_PRIVATE_KEY=0x...\nPMENGINE_MAX_POSITION_SIZE=1000\nPMENGINE_MAX_TOTAL_EXPOSURE=5000\nPMENGINE_TICK_INTERVAL_MS=1000\n```\n\n## pmstrat\n\n```bash\ncd pmstrat \u0026\u0026 uv sync\nuv run pmstrat\n```\n\nStrategy DSL and backtesting framework. Define strategies in a constrained Python subset using the `@strategy` decorator, backtest locally, then transpile to Rust for execution by pmengine.\n\n```\nPython Strategy (pmstrat DSL)\n    ↓ transpile\nRust Strategy Code\n    ↓ compile into\npmengine binary\n    ↓ execute\nPolymarket (production)\n```\n\n## Test\n\n```bash\ncd pmtrader \u0026\u0026 uv run pytest      # Python SDK tests\ncd pmstrat \u0026\u0026 uv run pytest       # Strategy tests\ncd pmproxy \u0026\u0026 cargo test          # Proxy tests\ncd pmengine \u0026\u0026 cargo test         # Engine tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunterjsb%2Fpmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhunterjsb%2Fpmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunterjsb%2Fpmt/lists"}