Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions skills/polymarket/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2024 skylavis-sky

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 changes: 21 additions & 0 deletions skills/polymarket/SKILL_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# polymarket -- Skill Summary

## Overview
The Polymarket skill enables trading on prediction markets where users buy and sell YES/NO outcome tokens for real-world events on Polygon. Each market resolves to $1.00 for winners or $0.00 for losers, with prices representing implied probabilities. The skill provides read-only market browsing and position checking without authentication, plus full trading capabilities including buying, selling, and order management when API credentials are configured.

## Usage
Install the plugin and connect your wallet to Polygon (chain 137). For trading functionality, set up Polymarket API credentials via environment variables. Use commands to browse markets, check positions, and execute trades.

## Commands
| Command | Description |
|---------|-------------|
| `list-markets` | Browse active prediction markets with optional keyword filtering |
| `get-market` | Get detailed market information and order book data |
| `get-positions` | View current positions and PnL for a wallet address |
| `buy` | Buy YES or NO shares with specified amount and optional limit price |
| `sell` | Sell existing shares with specified quantity and optional limit price |
| `cancel` | Cancel orders by ID, market, or all open orders |

## Triggers
Activate when users want to trade prediction markets, check Polymarket positions, browse available markets, or manage existing orders on the Polymarket platform. Use for any prediction market trading activity on Polygon.
13 changes: 13 additions & 0 deletions skills/polymarket/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# polymarket
Trade prediction markets on Polymarket — buy and sell YES/NO outcome tokens on Polygon.

## Highlights
- Browse active prediction markets and search by keywords
- Get detailed market information including prices and order book data
- View current positions with PnL calculations across all markets
- Buy YES or NO outcome tokens with limit or market orders
- Sell existing positions at specified prices or market rates
- Cancel individual orders, all orders for a market, or all open orders
- Direct integration with Polymarket's CLOB API for real-time data
- Automatic USDC.e approval handling for seamless trading

34 changes: 34 additions & 0 deletions skills/polymarket/plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
schema_version: 1
name: polymarket
version: "0.1.0"
description: "Trade prediction markets on Polymarket — buy and sell YES/NO outcome tokens on Polygon"
author:
name: skylavis-sky
github: skylavis-sky
category: defi-protocol
tags:
- prediction-market
- polymarket
- polygon
- trading
- defi
- clob
license: MIT

components:
skill:
dir: skills/polymarket

build:
lang: rust
binary_name: polymarket
source_repo: skylavis-sky/onchainos-plugins
source_commit: "df1e7d0036ccb440358198aff226b093ecc58840"
source_dir: polymarket

api_calls:
- "https://clob.polymarket.com"
- "https://gamma-api.polymarket.com"
- "https://data-api.polymarket.com"
- "https://plugin-store-dun.vercel.app/install"
- "https://www.okx.com/priapi/v1/wallet/plugins/download/report"
Loading