1368/polymarket-trade/SKILL.md
Place real bets on Polymarket prediction markets using the agent wallet. Buy/sell outcome tokens, check balances, manage orders. Requires USDC on Polygon and wallet policy allowing EIP-712 signing.
npx skillsauth add starchild-ai-agent/community-skills @1368/polymarket-tradeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Trade on Polymarket CLOB using the agent's Polygon wallet in EOA mode (signature_type=0).
| Mode | sig_type | How it works | Gas? |
|---|---|---|---|
| EOA (we use this) | 0 | Agent wallet = signer AND maker. No proxy. | Yes — POL for one-time approvals |
| Safe/Proxy | 2 | Gnosis Safe proxy holds funds, EOA signs. | No (relayer pays) |
Why EOA? Simpler — no proxy deployment, no relayer. Only gas cost is ~$0.01 POL for one-time approvals. CLOB orders are gasless after that.
If POLY_API_KEY is NOT in .env, follow these steps:
Use wallet_info to get the agent's Polygon address → this becomes POLY_WALLET.
Sign an EIP-712 ClobAuth message and POST to CLOB to get API key/secret/passphrase.
Domain: { name: "ClobAuthDomain", version: "1", chainId: 137, verifyingContract: "0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E" }
Types: ClobAuth: [address, timestamp(string), nonce(uint256), message(string)]
Message: { address: WALLET, timestamp: NOW, nonce: "0", message: "This message attests that I control the given wallet" }
wallet_sign_typed_datahttps://clob.polymarket.com/auth/api-key (VPN required) with L1 auth headers.env: POLY_API_KEY, POLY_SECRET, POLY_PASSPHRASE, POLY_WALLETSend to the agent wallet address on Polygon:
0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174) — betting bankrollApprove both CTF Exchange contracts to spend USDC (max allowance):
from eth_abi import encode
from eth_utils import function_signature_to_4byte_selector
sel = function_signature_to_4byte_selector("approve(address,uint256)")
USDC = "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"
# Approval 1: CTF Exchange
data1 = sel + encode(['address','uint256'], ['0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E', 2**256-1])
# wallet_transfer(to=USDC, amount="0", chain_id=137, data="0x"+data1.hex())
# Approval 2: CTF Exchange Neg-Risk
data2 = sel + encode(['address','uint256'], ['0xC5d563A36AE78145C45a50134d48A1215220f80a', 2**256-1])
# wallet_transfer(to=USDC, amount="0", chain_id=137, data="0x"+data2.hex())
python3 skills/polymarket-trade/scripts/poly_research.py balance
Should show USDC balance and allowance > 0. Setup complete.
Agent needs: eth_signTypedData_v4 (order signing) + eth_sendTransaction on chain 137 (approvals).
All CLOB API requests are geo-blocked. The script auto-routes through sc-vpn.internal:8080 (default: Germany). Gamma API is NOT blocked.
Set region in .env: POLY_VPN_REGION=de
| Contract | Address |
|---|---|
| CTF Exchange | 0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E |
| CTF Exchange (neg-risk) | 0xC5d563A36AE78145C45a50134d48A1215220f80a |
| USDC | 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 |
NEVER place a bet without explicit user confirmation. Always:
python3 skills/polymarket-trade/scripts/poly_research.py lookup "<polymarket_url>"
web_search for news, expert opinions, datapython3 skills/polymarket-trade/scripts/poly_research.py orderbook <token_id>
python3 skills/polymarket-trade/scripts/poly_research.py rr <token_id> <YES|NO> <size_usd>
📊 Suggested Bet:
Market: "Will X happen?"
Side: YES @ $0.35 (market: 35%, est: 55%)
Size: $20 → 57.14 tokens
Win: +$37.14 | Lose: -$20.00 | R/R: 1:1.86
# a. Check balance
python3 skills/polymarket-trade/scripts/poly_research.py balance
# b. Prepare order (outputs domain/types/message/meta JSON)
python3 skills/polymarket-trade/scripts/poly_research.py prepare <token_id> BUY <price> <size> [neg_risk] [tick_size]
# c. Sign with wallet_sign_typed_data (primaryType: "Order")
# d. Post signed order
python3 -c "
import sys; sys.path.insert(0, '/data/workspace/skills/polymarket-trade/scripts')
from poly_research import post_signed_order
s, r = post_signed_order('<token_id>', '<signature>', <meta_dict>)
print(s, r)
"
# e. Verify
python3 skills/polymarket-trade/scripts/poly_research.py orders
python3 skills/polymarket-trade/scripts/poly_research.py search "query" # Find markets
python3 skills/polymarket-trade/scripts/poly_research.py positions # Current positions
python3 skills/polymarket-trade/scripts/poly_research.py trades # Recent trades
python3 skills/polymarket-trade/scripts/poly_research.py cancel <order_id> # Cancel order
python3 skills/polymarket-trade/scripts/poly_research.py cancel_all # Cancel all
development
--- name: "@5326/fvg-delta-forex-engine" version: 6.0.0 --- # FVG-Delta Forex Signal Engine v6.0 A production FastAPI service that scans the global forex market on **15-minute candles**, runs a strict lock-forward Smart-Money-Concept (SMC) staged state machine, and alerts on the late stages. It is the forex evolution of the FVG-Delta crypto engine — **identical strategy**, refined for forex speed and mechanics. ## What it scans A curated, liquidity-screened universe (no illiquid exotics, no
development
--- name: "@5322/fvg-engine" version: 1.0.0 --- # FVG-Delta Crypto Signal Engine v6.0 A production FastAPI service that scans MEXC UST-M perpetual futures on **closed 15-minute candles**, runs a strict lock-forward Smart-Money-Concept (SMC) staged state machine, draws annotated chart screenshots, sends per-trade Telegram alerts, and serves a live dashboard with an in-memory Trade History. Everything lives in `assets/app.py`; the rest is config, docs, and entrypoints. ## The strategy — five lo
development
Builds and app/bot to print Crypto Futures Signals based on a Strategy.
development
--- name: "@5312/delta-strategy" version: 1.0.0 --- # FVG-Delta Crypto Signal Engine — Agent / Maintainer Guide (v5.5) This is the single source of truth for any AI agent or engineer taking over this project. Read it fully before touching `app.py`. It explains the strategy, the code workflow, every bug that was fixed in this revision, the current state, and the rules for updating the app and its docs safely. --- ## 1. What the app is A production-style FastAPI service that scans **MEXC UST-