Logotipo de Polymarket Trading

Polymarket Trading

OrganizaciónPopular
BlockRunAI
polymarket-trading

Use when the user wants to actually PLACE, manage, or redeem bets on Polymarket (not just read odds — that's the blockrun_predexon_* data tools). Covers setup (deposit wallet, funding, approvals), buy/sell with confirm gating, positions, redeeming winnings, geoblock handling, and the end-to-end flow.

Add to TypingMind

Descripción general

EditorBlockRunAI
RepositorioClawRouter
Nombre de la habilidadpolymarket-trading
Estrellas
6.6K
Forks
650
Archivos incluidos
Solo instrucciones
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por BlockRunAI en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Polymarket Trading en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/BlockRunAI/ClawRouter/tree/main/skills/polymarket-trading
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/BlockRunAI/ClawRouter.git /tmp/ClawRouter
mkdir -p .claude/skills
cp -r /tmp/ClawRouter/skills/polymarket-trading .claude/skills/polymarket-trading
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Polymarket Trading en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Polymarket Trading automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Polymarket Trading no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Polymarket Trading (blockrun_polymarket)

Real-money trading on Polymarket's CLOB V2 (Polygon), signed locally by the user's ClawRouter wallet key. Data discovery stays on the blockrun_predexon_* tools — blockrun_polymarket only trades.

Mental model

  • Signer = the ClawRouter wallet key (~/.openclaw/blockrun/wallet.key, or BLOCKRUN_WALLET_KEY) — the SAME wallet that pays for LLM calls. Never leaves the machine.
  • Deposit wallet = a Polygon vault contract derived from that key (POLY_1271). It holds the betting funds in pUSD and only honors the signer's EIP-712 signatures. Deploy/approve/redeem are gasless (relayer).
  • Money separation: bets spend pUSD on Polygon; x402 API fees spend USDC on Base — but both come from the ONE ClawRouter wallet. The x402 budget ledger does NOT cover bets — confirm:true + caps do.
  • Zero setup: no Polymarket account, no API keys, no gas token. On first setup ClawRouter bootstraps a builder key from the user's OWN wallet, then derives + deploys the vault (all gasless). Geoblock is handled by default — CLOB traffic routes through BlockRun's Tokyo egress out of the box.

Golden rules for agents

  1. Never pass confirm:true unless the user explicitly approved that exact trade. Call once WITHOUT confirm → show the dry-run preview → ask → re-call with confirm:true.
  2. Per-order cap POLYMARKET_MAX_BET_USD (default $25) and optional session cap are enforced locally; don't try to split orders to sneak past them.
  3. On ANY error, read the message — it says exactly what to do next (fund, approve, region, re-run setup). Don't retry blindly.

End-to-end flow

# 0. No Polymarket account or API keys needed — ClawRouter bootstraps everything
#    from the user's own wallet on first setup. (Set POLYMARKET_CLOB_HOST to a
#    permitted-region egress only if the user is in a geoblocked region.)

# 1. Provision + inspect (idempotent, safe to re-run any time)
blockrun_polymarket action:"setup"
# → deposit wallet address + funding instructions + region status

# 2. Fund the vault from the user's Base USDC — gasless x402, one call ($0.01 fee,
#    non-custodial). pUSD credit is ASYNC (minutes) — re-run setup to watch it. Min $2.
blockrun_polymarket action:"fund" amount_usd:5             # dry-run preview
blockrun_polymarket action:"fund" amount_usd:5 confirm:true

# 3. Sign the one-time gasless approval batch (after user consent)
blockrun_polymarket action:"setup" confirm:true

# 4. Find a market + token (data tool, paid data)
blockrun_predexon_markets ...   # → clobTokenIds, conditionId (Polymarket /v1/pm data)

# 5. Preview, then place
blockrun_polymarket action:"buy" token_id:"..." amount_usd:2            # dry-run
blockrun_polymarket action:"buy" token_id:"..." amount_usd:2 confirm:true  # market FOK
#   or limit: price:0.45 size:10 (GTC; order_type:"GTD" + expires_at for expiry)
#   or via condition: condition_id:"0x..." outcome:"Yes"

# 6. Manage
blockrun_polymarket action:"orders"                     # open orders
blockrun_polymarket action:"cancel" order_id:"..."      # or all:true
blockrun_polymarket action:"positions"                  # holdings + PnL + redeemable

# 7. Claim winnings after resolution (gasless)
blockrun_polymarket action:"redeem" condition_id:"0x..."             # preview
blockrun_polymarket action:"redeem" condition_id:"0x..." confirm:true

# 8. Cash out — pUSD → native USDC on Base, back to the user's agent wallet
blockrun_polymarket action:"withdraw"                                # dry-run (full balance)
blockrun_polymarket action:"withdraw" confirm:true                   # (partial: amount_usd:5)

Order semantics

  • Prices are probabilities 0–1, auto-rounded to the market's tick grid.
  • Market buy = amount_usd (dollars). Market sell = size (shares).
  • Limit orders: price + size; default GTC; post_only:true for maker-only.
  • FOK fails whole-or-nothing; FAK fills what it can. On "FOK not filled", offer FAK or a limit at the shown book price.

Regions / geoblock

Order placement is IP-geoblocked (US/UK/EU + many regions). Handled by default — CLOB traffic routes through BlockRun's Tokyo egress, so setup reports ✅ Region: order placement permitted out of the box; you don't need to do anything. A user can override with POLYMARKET_CLOB_HOST (their own relay), or POLYMARKET_CLOB_PROXY / HTTPS_PROXY. Respecting Polymarket's ToS for the user's jurisdiction is the user's responsibility — never suggest evading it.

Troubleshooting

  • "No deposit wallet configured" → run action:"setup".
  • "No ClawRouter wallet found" → generate one via the /wallet command (or set BLOCKRUN_WALLET_KEY) before trading.
  • No manual creds are ever needed — ClawRouter bootstraps its builder key from the user's own wallet on first setup. (Advanced: POLYMARKET_SIG_TYPE=0 = plain EOA mode; needs POL gas + pUSD in the EOA, and is read-only for orders.)
  • Balance/allowance errors right after funding → setup again (refreshes the CLOB's balance cache).
  • 403 → region issue; see setup's region line.
  • "order signer address has to be the address of the API KEY" → auto-recovered once (creds re-derived); if persistent, setup, then consider POLYMARKET_SIG_TYPE=0 (upstream clob-client-v2 issue #65).

Preguntas frecuentes

¿Qué hace la habilidad de IA Polymarket Trading?

Use when the user wants to actually PLACE, manage, or redeem bets on Polymarket (not just read odds — that's the blockrun_predexon_* data tools). Covers setup (deposit wallet, funding, approvals), buy/sell with confirm gating, positions, redeeming winnings, geoblock handling, and the end-to-end flow.

¿Por qué usar Polymarket Trading en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Polymarket Trading está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Polymarket Trading en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/BlockRunAI/ClawRouter/tree/main/skills/polymarket-trading. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Polymarket Trading?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Polymarket Trading?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Polymarket Trading con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Polymarket Trading?

Sí. BlockRunAI la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇