### Installation VSCode Source: https://github.com/nicolasdbs8/polymarket/blob/main/README.md Commandes pour naviguer vers le répertoire du projet et l'ouvrir dans VSCode. ```powershell cd C:\chemin\vers\paper-trading code . ``` -------------------------------- ### System Configuration Parameters Source: https://github.com/nicolasdbs8/polymarket/blob/main/README.md Example JSON snippet showing parameters for decision thresholds, extreme market veto, sizing, and estimation within the system configuration. ```json "decision_thresholds": { "min_edge": 0.05, "standard_edge": 0.12 } "extreme_market_veto": { "enabled": true, "high_price_ceiling": 0.75, "low_price_ceiling": 0.25, "structural_edge_threshold": 0.12 } "sizing": { "paper_bankroll": 1000, "small_position_pct": 0.02, "standard_position_pct": 0.05 } "estimation": { "adjustment_cap": 0.30 } ``` -------------------------------- ### Fetch Market Command Source: https://github.com/nicolasdbs8/polymarket/blob/main/README.md Command to fetch market data using fetch_market.py. ```powershell python fetch_market.py --url "https://polymarket.com/event/..." --id MKT-00X ``` -------------------------------- ### Workflow batch (multi-contrats) Source: https://github.com/nicolasdbs8/polymarket/blob/main/README.md Commandes pour exécuter le workflow de traitement par lots. ```bash python batch_fetch.py --url "https://polymarket.com/event/..." --id BATCH-001 # → Colle batches/BATCH-001/chatgpt_prompt.txt dans ChatGPT # → Sauvegarde la réponse dans batches/BATCH-001/batch_payload.json python batch_engine.py --batch BATCH-001 ``` -------------------------------- ### Direct Selection without Interaction Source: https://github.com/nicolasdbs8/polymarket/blob/main/README.md Command to fetch market data with a specific market index. ```powershell python fetch_market.py --url "..." --id MKT-00X --market-index 38 ``` -------------------------------- ### Workflow batch (multi-contrats) Source: https://github.com/nicolasdbs8/polymarket/blob/main/README.md Diagramme illustrant le flux de données pour un traitement par lots de plusieurs contrats. ```text polymarket_scan.py → batch_fetch.py → ChatGPT → batch_engine.py ``` -------------------------------- ### Workflow marché unique Source: https://github.com/nicolasdbs8/polymarket/blob/main/README.md Commandes pour exécuter le workflow complet pour un seul marché. ```bash # 1. Scanner pour trouver un marché python polymarket_scan.py # 2. Récupérer le marché (copie l'URL depuis le scan) python fetch_market.py --url "https://polymarket.com/event/..." --id MKT-00X # 3. Envoyer market_request.json à ChatGPT → placer analysis_payload.json dans markets/MKT-00X/ # 4. Lancer le moteur python moteur.py --payload markets/MKT-00X/analysis_payload.json # 5. Enregistrer dans le journal python journal.py add --market MKT-00X ``` -------------------------------- ### Structure du projet Source: https://github.com/nicolasdbs8/polymarket/blob/main/README.md Arborescence des fichiers et répertoires du projet de paper trading. ```text paper-trading/ │ ├── polymarket_scan.py ← scanner de marchés ├── fetch_market.py ← génère market_request.json depuis une URL ├── moteur.py ← moteur de calcul ├── batch_fetch.py ← génère une demande d'analyse groupée ├── batch_engine.py ← lance le moteur sur un batch complet ├── journal.py ← tient le journal des positions │ ├── schemas/ │ ├── market_request.schema.json │ ├── analysis_payload.schema.json │ └── system_config.json │ ├── markets/ │ └── MKT-00X/ │ ├── market_request.json │ ├── analysis_payload.json │ └── engine_output.json │ ├── batches/ │ └── BATCH-001/ │ ├── batch_request.json │ ├── chatgpt_prompt.txt │ ├── batch_payload.json │ └── results/ │ ├── batch_summary.json │ └── BATCH-001-XX/ │ └── engine_output.json │ └── journal.json ← créé automatiquement au premier journal.py add ``` -------------------------------- ### Scanner Commands Source: https://github.com/nicolasdbs8/polymarket/blob/main/README.md Various commands to run the polymarket_scan.py script with different filters and options. ```powershell python polymarket_scan.py python polymarket_scan.py --max-days 7 python polymarket_scan.py --max-days 30 python polymarket_scan.py --min-days 14 --max-days 90 python polymarket_scan.py --category geopolitics python polymarket_scan.py --category macroeconomics python polymarket_scan.py --category electoral_politics python polymarket_scan.py --min-volume 50000 python polymarket_scan.py --top 10 --export scans/scan_2026-03-19.json python polymarket_scan.py --category geopolitics --max-days 60 --min-volume 20000 ``` -------------------------------- ### Pipeline complet Source: https://github.com/nicolasdbs8/polymarket/blob/main/README.md Diagramme illustrant le flux de données pour un marché unique, de la découverte à l'enregistrement de la position. ```text polymarket_scan.py ← trouve les marchés intéressants │ ▼ fetch_market.py ← génère le market_request depuis l'URL │ ▼ ChatGPT ← produit l'analysis_payload (analyse structurée) │ ▼ moteur.py ← calcule l'edge et la décision │ ▼ journal.py ← enregistre la position ``` -------------------------------- ### ChatGPT Prompt for Predictive Trading Analysis Source: https://github.com/nicolasdbs8/polymarket/blob/main/README.md A detailed prompt for ChatGPT outlining its role, tasks, production protocol, JSON formatting rules, mandatory fields, and common errors to avoid when generating analysis payloads for a predictive trading system. ```text # Rôle Tu es l'assistant analytique d'un système de paper trading sur marchés prédictifs (Polymarket). Ton rôle est de produire des analysis_payload structurés et valides, conformes au protocole V2.3. Tu ne prends pas de décisions de trading. Tu ne calcules pas les edges ni les probabilités finales. Ces calculs sont effectués par un moteur Python séparé. # Ce que tu fais Quand l'utilisateur te soumet un market_request.json ou un batch prompt, tu produis : 1. Un résumé de ta recherche en langage naturel 2. Le fichier JSON complet et valide Tu utilises ta capacité de recherche internet avant de produire tout payload. # Protocole de production ## Étape 1 — Recherche internet (obligatoire) Contexte récent, précédents historiques, acteurs impliqués, contraintes institutionnelles, règle de résolution exacte sur Polymarket. ## Étape 2 — Screening screening_status : "admissible", "conditional", "rejected" event_clarity, resolution_clarity, liquidity_quality, information_accessibility, market_noise_level : "high", "medium", "low" ## Étape 3 — Base rate base_rate_value : décimale 0.01–0.99 (ex: 0.30 pour 30%, jamais 30) base_rate_reference_class : obligatoire base_rate_comment : limites du parallèle historique ## Étape 4 — Prérequis Deux listes : "blocking" et "weighted" status : "filled", "partial", "not_filled", "unknown" ## Étape 5 — Facteurs factor_type : "accelerator" ou "brake" uniquement factor_score : entier -2, -1, 0, 1 ou 2 (jamais décimale) factor_weight : entier 1, 2 ou 3 uniquement factor_comment : obligatoire si factor_weight = 3 ## Étape 6 — Confiance confidence_sources, confidence_model, confidence_context, confidence_overall : "high", "medium", "low" ## Étape 7 — Ambiguïté event_ambiguity, resolution_ambiguity : "high", "medium", "low" ATTENTION : resolution_ambiguity = "high" → veto automatique. ## Étape 8 — Contradiction forcée (OBLIGATOIRE) best_counter_thesis : string non vide top_3_failure_reasons : array de EXACTEMENT 3 strings market_might_be_right_because : string thesis_invalidation_trigger : string # Règles de format JSON thesis_id : market_id + "-TH1" analysis_id : thesis_id + "-A1" analysis_version : "A1" analysis_timestamp : heure actuelle ISO 8601 resolution_date : TOUJOURS inclure au niveau racine du payload schema_version : "1.0" protocol_version : "2.3" Enums : "high"/"medium"/"low" — "accelerator"/"brake" — "filled"/"partial"/"not_filled"/"unknown" Probabilités : décimale 0.01–0.99, jamais pourcentage factor_score : entier -2 à 2, factor_weight : entier 1 à 3 Champs bloquants (moteur refuse si absent) : - base_rate.base_rate_value - factor_list non vide avec factor_score et factor_weight - confidence.confidence_overall - ambiguity.event_ambiguity et ambiguity.resolution_ambiguity - contradiction_forced.best_counter_thesis - contradiction_forced.top_3_failure_reasons (exactement 3 éléments) # Erreurs à éviter 1. Oublier resolution_date dans le payload 2. top_3_failure_reasons avec ≠ 3 éléments 3. factor_score ou factor_weight décimaux ou hors bornes 4. Probabilités en pourcentage 5. Enums en français # Format de livraison Marché unique : résumé + analysis_payload.json indenté sans commentaires Batch : résumé + tableau JSON [ { payload1 }, { payload2 }, ... ] (suivre exactement batch_payload_exemple.json) ``` -------------------------------- ### Example JSON Output Structure Source: https://github.com/nicolasdbs8/polymarket/blob/main/batches/BATCH-004/chatgpt_prompt.txt This JSON structure represents the expected output for a batch analysis, with one 'analysis_payload' object per contract. ```json [ { analysis_payload complet pour contrat 1 }, { analysis_payload complet pour contrat 2 }, ... ] ``` -------------------------------- ### Orderbook Snapshot Script Source: https://github.com/nicolasdbs8/polymarket/blob/main/doge5m/README_doge5m.md This command initiates the collection of orderbook snapshots for the DOGE asset with a 5-minute timeframe, and generates a report. ```bash python orderbook_snapshot.py --asset doge --timeframe 5m report ``` -------------------------------- ### Orderbook Snapshot Script Source: https://github.com/nicolasdbs8/polymarket/blob/main/sol5m/README_sol5m.md This command initiates the collection of orderbook data for the SOL asset with a 5-minute timeframe, generating a report. ```bash python orderbook_snapshot.py --asset sol --timeframe 5m report ``` -------------------------------- ### Commandes principales Source: https://github.com/nicolasdbs8/polymarket/blob/main/btc5m/README_btc5m.md Commandes pour exécuter les scripts du module BTC 5m. ```bash python btc5m/btc5m_signal.py ``` ```bash python btc5m/btc5m_signal.py friction ``` ```bash python btc5m/btc5m_signal.py log ``` ```bash python btc5m/btc5m_pnl.py ``` ```bash python btc5m/btc5m_projection.py ``` -------------------------------- ### Orderbook Snapshot Script Source: https://github.com/nicolasdbs8/polymarket/blob/main/ethdaily/README_ethdaily.md This command initiates the collection of orderbook snapshots for the daily ETH market, aiming for 48 hours of data with 10-minute intervals. ```bash python orderbook_snapshot.py --asset eth --timeframe daily report ``` -------------------------------- ### Projection parameters in btc5m_projection.py Source: https://github.com/nicolasdbs8/polymarket/blob/main/btc5m/README_btc5m.md Configuration parameters for projections, including initial portfolio and sizing for small and standard signals. ```python PORTFOLIO_INIT = 100.0 # capital de départ en USDC SIZE_SMALL = 0.02 # 2% — mise pour signaux PETIT (edge_net < 3%) SIZE_STANDARD = 0.05 # 5% — mise pour signaux STANDARD (edge_net ≥ 3%) ``` -------------------------------- ### Orderbook Snapshot Script Source: https://github.com/nicolasdbs8/polymarket/blob/main/xrp15m/README_xrp15m.md This command initiates the collection of orderbook data for the XRP market with a 15-minute timeframe, generating a report. ```bash python orderbook_snapshot.py --asset xrp --timeframe 15m report ``` -------------------------------- ### Orderbook Snapshot Script Source: https://github.com/nicolasdbs8/polymarket/blob/main/sol15m/README_sol15m.md This command initiates the collection of orderbook snapshots for the SOL asset with a 15-minute timeframe, and generates a report. ```bash python orderbook_snapshot.py --asset sol --timeframe 15m report ``` -------------------------------- ### Signal parameters in btc5m_signal.py Source: https://github.com/nicolasdbs8/polymarket/blob/main/btc5m/README_btc5m.md Configuration parameters for signal generation, including edge threshold, friction, and trading window. ```python EDGE_THRESHOLD = 0.02 # edge minimum pour émettre un signal DEFAULT_FRICTION = 0.005 # spread/2 estimé (mettre à jour avec 'friction') TRADE_WINDOW_UTC = (10, 22) # fenêtre active en heures UTC ``` -------------------------------- ### Orderbook Snapshot Script Source: https://github.com/nicolasdbs8/polymarket/blob/main/eth5m/README_eth5m.md This command initiates the collection of orderbook snapshots for the ETH asset with a 5-minute timeframe, and generates a report. ```bash python orderbook_snapshot.py --asset eth --timeframe 5m report ``` -------------------------------- ### Orderbook Snapshot Script Source: https://github.com/nicolasdbs8/polymarket/blob/main/xrp5m/README_xrp5m.md This command initiates the collection of orderbook snapshots for the XRP asset with a 5-minute timeframe, generating a report. ```bash python orderbook_snapshot.py --asset xrp --timeframe 5m report ``` -------------------------------- ### Run BTC5M Kelly simulation Source: https://github.com/nicolasdbs8/polymarket/blob/main/btc5m/README_btc5m.md Command to run the full Kelly simulation for all trades. ```bash python btc5m/btc5m_kelly.py ``` -------------------------------- ### Rapport friction / slippage / liquidité + verdict go/no-go Source: https://github.com/nicolasdbs8/polymarket/blob/main/btcdaily/README_btcdaily.md This command initiates the generation of a report detailing market friction, slippage, and liquidity over a 24-hour period, culminating in a go/no-go decision for the trading strategy. ```bash # Rapport friction / slippage / liquidité + verdict go/no-go python orderbook_snapshot.py --asset btc --timeframe daily report ``` -------------------------------- ### Exemple de structure de sortie JSON Source: https://github.com/nicolasdbs8/polymarket/blob/main/batches/BATCH-001/chatgpt_prompt.txt Structure attendue pour le fichier batch_payload.json, contenant une liste d'objets analysis_payload. ```json [ { analysis_payload complet pour contrat 1 }, { analysis_payload complet pour contrat 2 }, ... ] ``` -------------------------------- ### Run filtered BTC5M Kelly simulation Source: https://github.com/nicolasdbs8/polymarket/blob/main/btc5m/README_btc5m.md Command to run the Kelly simulation for trades filtered by edge > 3% and within the 10h-22h UTC window. ```bash python btc5m/btc5m_kelly_filtered.py ``` -------------------------------- ### Structure de signal_log.json Source: https://github.com/nicolasdbs8/polymarket/blob/main/btc5m/README_btc5m.md Exemple de la structure du fichier JSON contenant les logs de signal. ```json { "ts": "2026-03-20T19:21:35Z", "btc_price": 69930.9, "direction": "DOWN", "decision": "SIGNAL DOWN — PETIT", "edge_net": 0.0228, "raw_edge": 0.0228, "pm_slug": "btc-updown-5m-1774034400", "pm_up": 0.505, "pm_down": 0.495, "pm_mins_left": 3.4, "result": "down", "phase": "2" } ``` -------------------------------- ### Fee Calculation Formula Source: https://github.com/nicolasdbs8/polymarket/blob/main/btc5m/README_btc5m.md Dynamic taker fee calculation for Polymarket crypto 5m markets. ```mathematica fee = p × 0.018 × (4 × p × (1-p)) ``` -------------------------------- ### Orderbook Snapshot Script Source: https://github.com/nicolasdbs8/polymarket/blob/main/eth15m/README_eth15m.md This script is used for collecting orderbook snapshots. It is part of Phase 0 of the pipeline. ```bash python orderbook_snapshot.py --asset eth --timeframe 15m report ``` -------------------------------- ### Logique de signal Source: https://github.com/nicolasdbs8/polymarket/blob/main/btc5m/README_btc5m.md Étapes de la logique de génération de signal pour le module BTC 5m. ```plaintext 1. Modèle prédit P(UP) et P(DOWN) 2. edge_brut = |P(direction) - 0.50| 3. edge_net = edge_brut - friction (spread/2 Polymarket) 4. Si edge_net <= 0 → signal absorbé, pas de trade 5. Si edge_net < 3% → SIGNAL "PETIT" (mise conseillée : 2% du portefeuille) 6. Si edge_net ≥ 3% → SIGNAL "STANDARD" (mise conseillée : 5% du portefeuille) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.