Exiting an Alphapoly Position

Exiting an Alphapoly Position is a skill for Claude Code, Codex from chainstacklabs/polymarket-alpha-bot. It costs 78 tokens per session (710 once invoked), scanned A, original, Apache-2.0.

A workflow for selling or merging tokens from an open Alphapoly trading position. It covers choosing the correct action, confirming it, executing it, and checking the result.

In plain words
What is it for?
Use it to fully close a position, sell one token side, clear leftover tokens, merge resolved outcomes, retry pending positions, and verify completion.
Why use it?
It helps avoid using the wrong exit action for the position’s state and requires approval before a sale or merge.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/chainstacklabs/polymarket-alpha-bot/alphapoly-exit-position
Any agent
npx skills add chainstacklabs/polymarket-alpha-bot --skill alphapoly-exit-position
Clone the repo
git clone --depth 1 https://github.com/chainstacklabs/polymarket-alpha-bot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Exiting an Alphapoly Position

README.md
[![agentmods](https://agentmods.dev/badge/skills/chainstacklabs/polymarket-alpha-bot/alphapoly-exit-position.svg)](https://agentmods.dev/skills/chainstacklabs/polymarket-alpha-bot/alphapoly-exit-position)
Your own site
<a href="https://agentmods.dev/skills/chainstacklabs/polymarket-alpha-bot/alphapoly-exit-position"><img src="https://agentmods.dev/badge/skills/chainstacklabs/polymarket-alpha-bot/alphapoly-exit-position.svg" alt="Measured on agentmods" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 710 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00078 $0.00710
Opus 5 $0.00039 $0.00355
Sonnet 5 $0.00016 $0.00142
Haiku 4.5 $0.00008 $0.00071

Measured 4d ago against content hash 3f67b20ce210, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Exiting an Alphapoly Position scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/alphapoly-exit-position/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Exiting an Alphapoly Position

Prerequisites

  • Backend running on http://localhost:8000
  • Wallet unlocked (action endpoints return HTTP 401 if not)

Flow

  1. List positionsGET /positions (or ?state=active to filter)
  2. Pick a position — note the position_id
  3. Choose action based on state:
Situation Action
Fully close a position Exit — orchestrated merge + sell (preferred)
Sell one specific side Sell — token_type: "wanted"
Clear failed entry leftovers Sell — token_type: "unwanted"
Market resolved, hold both outcomes Merge
State is pending Retry
  1. Confirm — require explicit user approval before executing any sell or merge
  2. Execute — see quick reference below
  3. Verify — re-fetch position; full exit shows state: "complete"

Quick Reference

# Fully exit (orchestrated merge + sell) — preferred
POST /positions/{id}/exit
{"slippage": 10}

# Sell a side
POST /positions/{id}/sell
{"side": "target", "token_type": "wanted"}

# Merge resolved pair
POST /positions/{id}/merge
{"side": "target"}

# Retry pending
POST /positions/{id}/retry

# Check result
GET /positions/{id}

token_type Explained

When entering, the system splits pUSD into YES+NO tokens and sells the side you don't want via CLOB to recover partial cost.

  • "wanted" — the token you hold as your position (normal exit)
  • "unwanted" — residual from a failed or partial entry sell (cleanup)

Typical Exit Flow

GET  /positions                          # find position_id
POST /positions/{id}/sell                # {"side":"target","token_type":"wanted"}
POST /positions/{id}/sell                # {"side":"cover","token_type":"wanted"}
GET  /positions/{id}                     # confirm state == "complete"

If unwanted balances remain after entry: POST /positions/{id}/retry

If market resolved and holding both outcomes:

POST /positions/{id}/merge   # {"side":"target"}
POST /positions/{id}/merge   # {"side":"cover"}

Read the full file on GitHub · 87 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 87 lines · 78 tokens per session scan A 3f67b20ce210

Subscribe to this mod's changes

Exiting an Alphapoly Position is a skill published in the GitHub repository chainstacklabs/polymarket-alpha-bot (174 stars, last pushed 29d ago), licensed Apache-2.0. It adds 78 tokens to every session and 710 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

polymarket-profile

Polymarket address profiler — input any 0x address, get a complete trading profile with PnL, win rate, positions, category breakdown, and top trades. All data from public APIs, no local database needed.

runesleo/polymarket-toolkit · 51 tokens

polymarket

Trade on Polymarket prediction markets (CLOB V2) from a Privy EOA wallet. Search markets, place/cancel orders, manage positions. No private key handling. Use when the user wants to bet on event outcomes (e.g. "buy YES at 0.65 on the ceasefire market", "what are my open positions", "close my Trump bet").

Starchild-ai-agent/official-skills · 84 tokens

polymarket-plugin

Trade prediction markets on Polymarket - buy outcome tokens (YES/NO and categorical markets), check positions, list markets, manage orders, redeem winning tokens, and deposit funds on Polygon. Trigger phrases: buy polymarket shares, sell polymarket position, check my polymarket positions, list polymarket markets, get…

okx/plugin-store · 304 tokens

polymarket

Query Polymarket: markets, prices, orderbooks, history.

NousResearch/hermes-agent · 18 tokens

hyperliquid

Use when backtesting, deploying, funding, or debugging a live trading strategy on Hyperliquid through the Superior Trade API — writing Freqtrade configs and strategy code, running backtest sweeps, checking wallet balances, depositing USDC, trading HIP-3 stock/commodity perps, or diagnosing a deployment that will not…

Superior-Trade/superior-skills · 73 tokens

basis-arb

Use when the user asks for spot-perp basis trade, basis arbitrage, cash-and-carry, perp discount, or any setup that reads the spot–perp basis as a positioning signal. Long-perp leg only — pure two-leg basis arb requires a paired spot short (or long) which Freqtrade can't run cleanly. The strategy below captures the…

Superior-Trade/superior-skills · 87 tokens