> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Polymarket Integration

Supercharge your prediction market strategies by connecting Polymarket to your entire crypto ecosystem with B3OS. Automate complex trading logic, real-t...

![Polymarket logo](https://ai-icon.b3.fun/logo/polymarket) Integration available

Supercharge your prediction market strategies by connecting Polymarket to your entire crypto ecosystem with B3OS. Automate complex trading logic, real-time market monitoring, and instant position management using our seamless CLOB API integration.


**[Public page](https://b3os.org/integrations/app/polymarket)**

Open the user-facing integration overview for examples, templates, and sharing.
  **[Action reference](/actions/reference)**

Schema-level references for executable actions and test payloads.
  **[Trigger reference](/actions/trigger-reference)**

Event and schedule triggers that can start B3OS workflows.

## Build With Polymarket

Use Polymarket when a workflow needs to react to Polymarket: Market Closed, Polymarket: New Market Listed and follow up with actions such as Polymarket Cancel Order, Polymarket Close Position, Polymarket Deposit. Start in the visual editor to connect an account, then use the references below for payload shape, required fields, and API testing.

## Available Actions

| Action | ID | Connector | Required fields |
| --- | --- | --- | --- |
| ![Polymarket Cancel Order logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Cancel Order](/actions/reference/generated/polymarket-cancel-order) | `polymarket-cancel-order` | `wallet` | `mode` |
| ![Polymarket Close Position logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Close Position](/actions/reference/generated/polymarket-close-position) | `polymarket-close-position` | `wallet` | `tokenId` |
| ![Polymarket Deposit logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Deposit](/actions/reference/generated/polymarket-deposit) | `polymarket-deposit` | `wallet` | `recipientAddress` |
| ![Polymarket Get Activity logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Get Activity](/actions/reference/generated/polymarket-get-activity) | `polymarket-get-activity` | `wallet` | - |
| ![Polymarket Get Balance logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Get Balance](/actions/reference/generated/polymarket-get-balance) | `polymarket-get-balance` | `wallet` | - |
| ![Polymarket Get Builder Trades logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Get Builder Trades](/actions/reference/generated/polymarket-get-builder-trades) | `polymarket-get-builder-trades` | `wallet` | `builderCode` |
| ![Polymarket Get Leaderboard logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Get Leaderboard](/actions/reference/generated/polymarket-get-leaderboard) | `polymarket-get-leaderboard` | `-` | - |
| ![Polymarket Get Market logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Get Market](/actions/reference/generated/polymarket-get-market) | `polymarket-get-market` | `-` | - |
| ![Polymarket Get Market Price logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Get Market Price](/actions/reference/generated/polymarket-get-market-price) | `polymarket-get-market-price` | `-` | - |
| ![Polymarket Get Open Orders logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Get Open Orders](/actions/reference/generated/polymarket-get-open-orders) | `polymarket-get-open-orders` | `wallet` | - |
| ![Polymarket Get Orderbook logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Get Orderbook](/actions/reference/generated/polymarket-get-orderbook) | `polymarket-get-orderbook` | `-` | - |
| ![Polymarket Get Positions logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png) [Polymarket Get Positions](/actions/reference/generated/polymarket-get-positions) | `polymarket-get-positions` | `-` | `address` |


11 more actions are listed in the full action reference.

## Available Triggers

| Trigger | ID | Required configuration |
| --- | --- | --- |
| [Polymarket: Market Closed](/actions/trigger-reference/triggers/polymarket-market-close) | `polymarket-market-close` | - |
| [Polymarket: New Market Listed](/actions/trigger-reference/triggers/polymarket-new-market) | `polymarket-new-market` | - |
| [Polymarket: Trade on Market](/actions/trigger-reference/triggers/polymarket-market-trade) | `polymarket-market-trade` | `marketId` |
| [Polymarket: Trader Places Bet](/actions/trigger-reference/triggers/polymarket-user-bet) | `polymarket-user-bet` | `user` |


## Common Use Cases

**Automated Arbitrage & Hedging**

Monitor market prices across different prediction platforms and automatically execute trades on Polymarket using 'Get Market Price' and 'Place Bet' to capture price discrepancies.
  **Real-Time Market Monitoring**

Stay ahead of the curve by triggering automated alerts or data logging whenever a 'New Market Listed' event occurs, ensuring you are the first to react to new opportunities.
  **Algorithmic Prediction Trading**

Build sophisticated bots that scan the 'Get Orderbook' data and automatically execute bets when specific liquidity or price conditions are met, removing emotional bias from your trading.
  **Portfolio & Risk Management**

Automate your exit strategy by setting workflows that monitor your 'Get Open Orders' and 'Get Positions' to automatically close positions or redeem them when certain profit targets are hit.

## Connector Notes

- Create the connector from a trusted B3OS organization before publishing workflows that call external accounts.
- Keep OAuth tokens, API keys, bot tokens, channel IDs, and account IDs in connector settings or workflow props, not in reusable public template text.
- Test with the visual editor or `POST /v1/actions/{type}/test` before routing production traffic.

## Related Templates

| Template | Description | Tags |
| --- | --- | --- |
| [Polymarket: Copy Trade a User](https://b3os.org/templates/polymarket-copy-trade) | This workflow allows you copy trade any Polymarket user without needing a Polymarket account.... | slack-v2, slack-bot, defi, trading, wallet |
| [Automated Stop-Loss Manager for Polymarket](https://b3os.org/templates/polymarket-auto-stop-loss) | Periodically checks market positions and automatically closes any assets that fall below a pr... | slack-v2, slack-bot, trading, wallet, messaging |
| [Drake News → Polymarket Auto-Bet](https://b3os.org/templates/drake-news-polymarket-auto-bet) | Monitors music-news X accounts every minute for breaking Drake stories, asks AI YES/NO on you... | polymarket, twitter, prediction-market, bet |
| [HIP-4 vs Polymarket Market Scanner](https://b3os.org/templates/hip4-vs-polymarket-market-scanner) | Scans all active HIP-4 outcome markets on Hyperliquid, automatically finds matching Polymarke... | polymarket, alert, prediction-market, arbitrage, hyperliquid |
| [Morpho + Polymarket: Borrow to Place Bets](https://b3os.org/templates/morpho-usdc-auto-fund) | Monitors your wallet's USDC.e balance on Polymarket every 5 minutes. When the balance drops b... | defi, lending, polymarket, morpho |
| [Nothing Ever Happens: Auto-Buy No on Polymarket \(H/T Sterling\)](https://b3os.org/templates/polymarket-auto-buy-no) | Auto-buys 'No' on every eligible non-sports Polymarket. Scans markets on a schedule, filters... | defi, trading, cronjob, polymarket, recurring |
| [PM vs HL Edge Scanner](https://b3os.org/templates/polymarket-hyperliquid-edge-scanner) | Scans for cross-platform arbitrage edges between Polymarket and Hyperliquid HIP-4 outcome mar... | trading, polymarket, hyperliquid |
| [Polymarket: AI Bets When It Disagrees with the Market](https://b3os.org/templates/polymarket-ai-contrarian-bets) | Trades US-based policy events based on AI forecasts. On a set schedule, the workflow scrapes... | trading, wallet, polymarket |

## FAQ

**How does B3OS connect to my Polymarket account?**

B3OS uses a secure connection via the Polymarket CLOB API. To enable automation, you will need to provide your wallet private key and a proxy wallet address, which allows the platform to execute trades on your behalf automatically.
  **Do I need to manually create API credentials?**

No, API credentials for Polymarket are derived automatically through our secure integration process once your wallet details are configured.
  **Can I automate trades based on market events?**

Yes. You can set up workflows triggered by specific events such as 'New Market Listed' or 'Market Closed' to execute predefined actions like placing bets or checking orderbook depth.
  **Is it possible to monitor my Polymarket profit and loss automatically?**

Absolutely. You can use actions like 'Get Positions', 'Get Trade History', and 'Get Balance' to pull real-time data into your automated reporting or risk management workflows.
  **Can I automate the closing of my prediction market positions?**

Yes, B3OS allows you to build workflows that use the 'Close Position' or 'Redeem Positions' actions, ensuring you capture profits or cut losses based on specific market price triggers.