Polymarket CLI
Query prediction markets, place trades, and manage positions with the Polymarket CLI for AI agents.
Why use this skill?
Query Polymarket prediction markets, analyze order books, and manage on-chain trades securely with this powerful CLI tool for OpenClaw AI agents.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ivangdavila/polymarket-cliWhat This Skill Does
The Polymarket CLI skill empowers AI agents to interact directly with decentralized prediction markets on the Polygon blockchain. It provides a robust interface for querying market data, analyzing order books, and executing trades. By leveraging this tool, an agent can perform sophisticated market research, monitor real-time price action for specific event outcomes, and manage on-chain positions. The skill is designed with a clear separation between read-only analytical tasks and sensitive, wallet-gated transaction operations, ensuring that your financial assets remain secure while the agent handles data retrieval and trade orchestration.
Installation
To integrate this skill into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/ivangdavila/polymarket-cli
After installation, ensure you read the setup.md file within the package to configure your environment variables and wallet integration appropriately. The configuration is stored in ~/.config/polymarket/config.json, which must contain your private key and preferred chain settings.
Use Cases
- Market Intelligence: Automate the tracking of major political or economic events by querying the latest market data and odds.
- Algorithmic Analysis: Use the CLI to pull mid-point prices and spread data from the CLOB (Central Limit Order Book) to identify arbitrage opportunities or price inefficiencies.
- Portfolio Management: Monitor active positions and assess current exposure to various prediction market outcomes.
- Automated Execution: Once configured, the agent can be instructed to place market or limit orders when specific market conditions are met, provided the user has explicitly authorized the action.
Example Prompts
- "Check the current midpoint price and order book spread for the 'Will Trump win 2024' market; retrieve the token ID first."
- "List the top 10 most active prediction markets currently open and provide a brief summary of the potential outcomes."
- "Analyze my current positions on Polymarket and tell me if I have any tokens in markets that have closed but haven't been redeemed yet."
Tips & Limitations
- Token IDs vs. Slugs: Always remember that CLOB commands require the unique Token ID, not the human-readable slug. Use the
markets getcommand to retrieve the metadata before proceeding to trade operations. - Wallet Security: The agent is strictly forbidden from accessing wallet-creation or key-management commands. You must handle wallet imports and resets manually to maintain the highest level of security.
- Gas Awareness: Since all trading operations occur on the Polygon network, ensure your wallet maintains a sufficient balance of MATIC. The agent will not automatically top up your gas funds.
- Performance: For large datasets, utilize the
--limitand--offsetflags to prevent command timeouts and ensure efficient data processing. Always favor JSON output when connecting the skill to other downstream analytical tools.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ivangdavila-polymarket-cli": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, external-api
Related Skills
Animations
Create performant web animations with proper accessibility and timing.
Arduino
Develop Arduino projects avoiding common wiring, power, and code pitfalls.
Bulgarian
Write Bulgarian that sounds human. Not formal, not robotic, not AI-generated.
Arabic
Write Arabic that sounds human. Not formal, not robotic, not AI-generated.
Assistant
Manage tasks, communications, and scheduling with proactive and organized support.