Polymarket Bot Skill
Overview
This skill enables the creation and operation of a Polymarket bot for tasks such as fetching active markets, monitoring prices, placing orders, and running strategies. It's designed for users involved in cryptocurrency prediction markets, helping automate interactions via the Polymarket APIs while minimizing risks.
Quick Start
To get started, use the scripts in this skill to initialize and run a basic bot. For example, execute
scripts/fetch_markets.py to retrieve active markets, then use
scripts/bot_strategy.py for arbitrage checks.
Task-Based Structure
This skill is organized by tasks from the SOP, providing modular components for bot development.
Step 1: Research and Setup Prerequisites
- - Review Polymarket APIs (Gamma, CLOB, Data) as outlined in the SOP.
- Ensure tools like Python and Web3.py are installed.
- Reference
references/api_guide.md for detailed API usage.
Step 2: Define Bot Functionality and Strategy
- - Implement core features like data fetching and trade execution.
- Use prompts in
references/prompts.md to generate code for strategies. - Example: Run
scripts/strategy_logic.py for arbitrage detection.
Step 3: Development Phases
- - Data Fetching Module: Use
scripts/fetch_markets.py to query markets. - Authentication and Trading Setup: Handle in
scripts/auth_setup.py. - Testing and Deployment: Test with
scripts/test_bot.py and deploy via references.
Step 4: Potential Challenges and Mitigations
- - Reference
references/challenges.md for rate limits, fees, and security tips.
Step 5: Resources
- - See below for scripts and references based on the SOP.
Resources
scripts/
- -
fetch_markets.py: Script to fetch and parse market data from Polymarket APIs. - INLINECODE10 : Handles authentication and deriving API keys.
- INLINECODE11 : Implements bot strategies like arbitrage.
- INLINECODE12 : Combines phases into a full bot script.
references/
- -
api_guide.md: Documentation on Polymarket APIs and setup. - INLINECODE14 : Examples of prompts for code generation.
- INLINECODE15 : Common issues and mitigations for bot development.
assets/
- - (No assets needed for this skill at the moment.)
技能名称: polymarket-bot
详细描述:
Polymarket 机器人技能
概述
本技能支持创建和运行 Polymarket 机器人,用于执行获取活跃市场、监控价格、下达订单和运行策略等任务。它专为参与加密货币预测市场的用户设计,通过 Polymarket API 自动执行交互操作,同时最大限度降低风险。
快速开始
要开始使用,请利用本技能中的脚本初始化并运行一个基础机器人。例如,执行 scripts/fetch
markets.py 获取活跃市场,然后使用 scripts/botstrategy.py 进行套利检查。
基于任务的结构
本技能根据标准操作流程中的任务进行组织,为机器人开发提供模块化组件。
步骤 1:调研与设置前提条件
- - 按照标准操作流程中的说明,审查 Polymarket API(Gamma、CLOB、Data)。
- 确保已安装 Python 和 Web3.py 等工具。
- 参考 references/api_guide.md 了解详细的 API 使用方法。
步骤 2:定义机器人功能与策略
- - 实现核心功能,如数据获取和交易执行。
- 使用 references/prompts.md 中的提示生成策略代码。
- 示例:运行 scripts/strategy_logic.py 进行套利检测。
步骤 3:开发阶段
- - 数据获取模块:使用 scripts/fetchmarkets.py 查询市场。
- 身份验证与交易设置:在 scripts/authsetup.py 中处理。
- 测试与部署:通过 scripts/test_bot.py 进行测试,并参考相关文档进行部署。
步骤 4:潜在挑战与应对措施
- - 参考 references/challenges.md 了解速率限制、费用和安全提示。
步骤 5:资源
资源
scripts/
- - fetchmarkets.py:从 Polymarket API 获取并解析市场数据的脚本。
- authsetup.py:处理身份验证和派生 API 密钥。
- strategylogic.py:实现套利等机器人策略。
- botintegration.py:将各阶段整合为完整的机器人脚本。
references/
- - apiguide.md:关于 Polymarket API 及其设置的文档。
- strategyexamples.md:用于代码生成的提示示例。
- challenges.md:机器人开发中的常见问题及应对措施。
assets/