Agent skill

Trading Manifold

by alsk1992 in alsk1992/CloddsBot

Place bets on Manifold Markets using their REST API. An agent skill from alsk1992/CloddsBot.

MITAuto-check passedBusiness, Finance & HR

Install Trading Manifold

skills CLI
$ npx skills add alsk1992/CloddsBot --skill trading-manifold -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alsk1992/CloddsBot trading-manifold --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alsk1992/CloddsBot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/bundled/trading-manifold .claude/skills/trading-manifold && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
trading-manifold
GitHub stars
3k
Token cost
~2.4k tokens
SKILL.md length
122 words
Files
2
Skills in repo
116
Repo updated
First seen
Licence
MIT

At a glance

Place bets on Manifold Markets using their REST API. An agent skill from alsk1992/CloddsBot.

  • Works in 6 steps: Mana is play money - Can be donated to… → No limit on bets - Unlike real money… → Market maker AMM - Prices move based on… → …
  • Tasks that involve Trading and backtesting
  • SKILL.md covers Setup, Search Markets, Get Market by ID or Slug and Place a Bet, plus 9 more sections
  • Runs TypeScript scripts from its folder; reaches api.manifold.markets; needs API_KEY and MANIFOLD_API_KEY

What it does

Trading Manifold is an agent skill from alsk1992/CloddsBot. Place bets on Manifold Markets using their REST API

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `index.ts`).

It sits in Business, Finance & HR, covering Trading and backtesting and REST APIs. The repository describes itself as: Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes… The licence is MIT.

When your agent uses it

  • Tasks that involve Trading and backtesting
  • Tasks that involve REST APIs

Example prompts

  • “/trading-manifold”

Requirements

  • Python 3
  • Node.js
  • A credential in MANIFOLD_API_KEY
  • A credential in API_KEY

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Mana is play money - Can be donated to charity
  2. No limit on bets - Unlike real money markets
  3. Market maker AMM - Prices move based on bets
  4. Limit orders - Use limitProb for better prices
  5. API rate limits - Be gentle, ~60 requests/minute
  6. Shares ≠ Mana - Shares vary based on probability

What it can do on your machine

Read from SKILL.md and the folder at commit c930628. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (TypeScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.manifold.markets

    Also links to:

    • manifold.markets

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY
    • MANIFOLD_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Trading Manifold loads about 2.4k tokens when it runs. Until then it costs about 17 tokens; SKILL.md has 122 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~17
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from alsk1992/CloddsBot at commit c930628, republished under its MIT licence (© alsk1992). 122 words, ~2,400 tokens.

Download SKILL.mdSave it as .claude/skills/trading-manifold/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
trading-manifold
description
Place bets on Manifold Markets using their REST API
emoji
🎲
gates.envs
MANIFOLD_API_KEY

Manifold Markets Trading Skill

Real, working methods to bet on Manifold Markets using Mana (play money that can be donated to charity).

Setup

Get your API key from: https://manifold.markets/profile (API key section)

python
import os
import requests

API_URL = "https://api.manifold.markets/v0"
API_KEY = os.getenv("MANIFOLD_API_KEY")

def headers():
    return {
        "Authorization": f"Key {API_KEY}",
        "Content-Type": "application/json"
    }

Search Markets

python
def search_markets(query: str, limit: int = 10):
    """Search for markets"""
    r = requests.get(f"{API_URL}/search-markets", params={
        "term": query,
        "limit": limit,
        "filter": "open",
        "sort": "liquidity"
    })
    r.raise_for_status()
    markets = r.json()

    for m in markets[:5]:
        prob = m.get("probability", 0.5)
        print(f"\nMarket: {m['question']}")
        print(f"ID: {m['id']}")
        print(f"Probability: {prob*100:.1f}%")
        print(f"URL: {m.get('url', '')}")

    return markets

markets = search_markets("AI")

Get Market by ID or Slug

python
def get_market(id_or_slug: str):
    """Get market details"""
    # Try by ID first
    r = requests.get(f"{API_URL}/market/{id_or_slug}")
    if r.status_code == 404:
        # Try by slug
        r = requests.get(f"{API_URL}/slug/{id_or_slug}")

    r.raise_for_status()
    return r.json()

market = get_market("will-gpt5-be-released-before-2025")
print(f"Question: {market['question']}")
print(f"Probability: {market.get('probability', 0.5)*100:.1f}%")

Place a Bet

python
def place_bet(
    market_id: str,
    amount: int,           # Mana amount to bet
    outcome: str = "YES",  # "YES" or "NO"
    limit_prob: float = None  # Optional limit order probability
):
    """
    Place a bet on Manifold

    Args:
        market_id: The market ID (not slug!)
        amount: Amount of Mana to bet
        outcome: "YES" or "NO"
        limit_prob: Optional - if set, creates a limit order at this probability
    """
    payload = {
        "contractId": market_id,
        "amount": amount,
        "outcome": outcome
    }

    if limit_prob is not None:
        payload["limitProb"] = limit_prob

    r = requests.post(f"{API_URL}/bet", headers=headers(), json=payload)
    r.raise_for_status()
    result = r.json()

    print(f"Bet placed!")
    print(f"Shares: {result.get('shares', 0):.2f}")
    print(f"Probability after: {result.get('probAfter', 0)*100:.1f}%")

    return result

# Market bet - buys at current price
result = place_bet(
    market_id="abc123",
    amount=100,  # 100 Mana
    outcome="YES"
)

# Limit order - only fills at 40% or below
result = place_bet(
    market_id="abc123",
    amount=100,
    outcome="YES",
    limit_prob=0.40
)

Cancel Bet (Limit Orders Only)

python
def cancel_bet(bet_id: str):
    """Cancel a limit order"""
    r = requests.post(f"{API_URL}/bet/cancel/{bet_id}", headers=headers())
    r.raise_for_status()
    return True

cancel_bet("bet123")

Sell Shares

python
def sell_shares(
    market_id: str,
    outcome: str = "YES",
    shares: float = None  # None = sell all
):
    """
    Sell shares in a market

    Args:
        market_id: The market ID
        outcome: "YES" or "NO" - which shares to sell
        shares: Number of shares to sell (None = all)
    """
    payload = {
        "contractId": market_id,
        "outcome": outcome
    }

    if shares is not None:
        payload["shares"] = shares

    r = requests.post(f"{API_URL}/market/{market_id}/sell", headers=headers(), json=payload)
    r.raise_for_status()
    return r.json()

# Sell all YES shares
sell_shares("abc123", "YES")

# Sell specific amount
sell_shares("abc123", "YES", shares=50.0)

Get Your Bets

python
def get_my_bets(market_id: str = None):
    """Get your bets"""
    params = {}
    if market_id:
        params["contractId"] = market_id

    r = requests.get(f"{API_URL}/bets", headers=headers(), params=params)
    r.raise_for_status()
    bets = r.json()

    for b in bets[:10]:
        print(f"Bet: {b['outcome']} {b['amount']}M @ {b.get('probBefore', 0)*100:.0f}%")

    return bets

bets = get_my_bets()

Get Your Positions

python
def get_positions():
    """Get current positions across all markets"""
    # Get user info first
    r = requests.get(f"{API_URL}/me", headers=headers())
    r.raise_for_status()
    user = r.json()

    # Get bets to calculate positions
    r = requests.get(f"{API_URL}/bets", headers=headers(), params={"limit": 1000})
    bets = r.json()

    # Aggregate by market
    positions = {}
    for bet in bets:
        mid = bet["contractId"]
        if mid not in positions:
            positions[mid] = {"yes": 0, "no": 0, "invested": 0}

        if bet["outcome"] == "YES":
            positions[mid]["yes"] += bet.get("shares", 0)
        else:
            positions[mid]["no"] += bet.get("shares", 0)

        if not bet.get("isSold", False):
            positions[mid]["invested"] += bet["amount"]

    return positions, user.get("balance", 0)

positions, balance = get_positions()
print(f"Balance: {balance} Mana")
for mid, pos in positions.items():
    if pos["yes"] > 0 or pos["no"] > 0:
        print(f"Market {mid}: YES={pos['yes']:.1f}, NO={pos['no']:.1f}")

Get Balance

python
def get_balance():
    """Get your Mana balance"""
    r = requests.get(f"{API_URL}/me", headers=headers())
    r.raise_for_status()
    user = r.json()
    return user.get("balance", 0)

balance = get_balance()
print(f"Balance: {balance} Mana")

Complete Trading Bot Example

python
#!/usr/bin/env python3
"""
Manifold arbitrage bot - finds mispriced markets
"""

import os
import time
import requests

API_URL = "https://api.manifold.markets/v0"
API_KEY = os.getenv("MANIFOLD_API_KEY")

def h():
    return {"Authorization": f"Key {API_KEY}", "Content-Type": "application/json"}

def search(query):
    r = requests.get(f"{API_URL}/search-markets",
                    params={"term": query, "limit": 20, "filter": "open"})
    return r.json()

def bet(market_id, amount, outcome, limit_prob=None):
    payload = {"contractId": market_id, "amount": amount, "outcome": outcome}
    if limit_prob:
        payload["limitProb"] = limit_prob
    r = requests.post(f"{API_URL}/bet", headers=h(), json=payload)
    return r.json()

def get_balance():
    r = requests.get(f"{API_URL}/me", headers=h())
    return r.json().get("balance", 0)

# Strategy: Buy extreme probabilities (likely to revert)
MIN_LIQUIDITY = 1000  # Only trade liquid markets

while True:
    try:
        balance = get_balance()
        print(f"\nBalance: {balance} Mana")

        # Search trending markets
        markets = search("2024")

        for m in markets:
            prob = m.get("probability", 0.5)
            liquidity = m.get("totalLiquidity", 0)

            if liquidity < MIN_LIQUIDITY:
                continue

            # Buy YES on very low probability (< 10%)
            if prob < 0.10:
                print(f"LOW: {m['question'][:50]} at {prob*100:.1f}%")
                if balance > 50:
                    bet(m["id"], 50, "YES", limit_prob=0.15)

            # Buy NO on very high probability (> 90%)
            elif prob > 0.90:
                print(f"HIGH: {m['question'][:50]} at {prob*100:.1f}%")
                if balance > 50:
                    bet(m["id"], 50, "NO", limit_prob=0.85)

        time.sleep(300)  # Check every 5 minutes

    except Exception as e:
        print(f"Error: {e}")
        time.sleep(60)

Multiple Choice Markets

python
def bet_multiple_choice(market_id: str, answer_id: str, amount: int):
    """Bet on a multiple choice market"""
    payload = {
        "contractId": market_id,
        "amount": amount,
        "answerId": answer_id
    }

    r = requests.post(f"{API_URL}/bet", headers=headers(), json=payload)
    r.raise_for_status()
    return r.json()

# Get market with answers
market = get_market("who-will-win-2024-election")
for answer in market.get("answers", []):
    print(f"{answer['text']}: {answer['probability']*100:.1f}% (ID: {answer['id']})")

# Bet on specific answer
bet_multiple_choice("market123", "answer456", 100)

Create a Market

python
def create_market(
    question: str,
    description: str = "",
    close_time: int = None,  # Unix timestamp
    initial_prob: float = 0.5,
    ante: int = 100  # Initial liquidity
):
    """Create a new binary market"""
    payload = {
        "outcomeType": "BINARY",
        "question": question,
        "description": description,
        "initialProb": int(initial_prob * 100),
        "ante": ante
    }

    if close_time:
        payload["closeTime"] = close_time * 1000  # Milliseconds

    r = requests.post(f"{API_URL}/market", headers=headers(), json=payload)
    r.raise_for_status()
    return r.json()

# Create market
new_market = create_market(
    question="Will it rain tomorrow in NYC?",
    initial_prob=0.3,
    ante=100
)
print(f"Created: {new_market['url']}")

Important Notes

  1. Mana is play money - Can be donated to charity
  2. No limit on bets - Unlike real money markets
  3. Market maker AMM - Prices move based on bets
  4. Limit orders - Use limitProb for better prices
  5. API rate limits - Be gentle, ~60 requests/minute
  6. Shares ≠ Mana - Shares vary based on probability

© alsk1992, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in src/skills/bundled/trading-manifold of alsk1992/CloddsBot.

  • SKILL.md
  • index.ts

Open the folder on GitHubat commit c930628

Compare with similar skills

Trading Manifold next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Trading Manifold compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trading Manifold this skillalsk1992/CloddsBot3k—~2.4kAutomated safety check: PassMIT
Bankr SignalsaAAaqwq/AGI-Super-Team1052 repos~3.3kAutomated safety check: PassMIT
BankraAAaqwq/AGI-Super-Team1052 repos~7kAutomated safety check: NotesMIT
Superior Trade AuthSuperior-Trade/superior-skills215—~950Automated safety check: PassMIT
Onchain Pay Open APInpc-live/clawfirm1561 repos~4.9kAutomated safety check: PassMIT
Alpaca Broker Integrationalpacahq/alpaca-skills154—~3kAutomated safety check: PassApache-2.0

Similar skills

  • Bankr Signals

    aAAaqwq/AGI-Super-Team

    Transaction-verified trading signals on Base blockchain. An agent skill from aAAaqwq/AGI-Super-Team.

    105 GitHub starsUsed in 2 repos~3.3k tokens
    Backend & APIsAuto-check passed
  • Bankr

    aAAaqwq/AGI-Super-Team

    AI-powered crypto trading agent and LLM gateway via natural language.

    105 GitHub starsUsed in 2 repos~7k tokens
    Business, Finance & HRAuto-check: notes
  • Superior Trade Auth

    Superior-Trade/superior-skills

    A skill your agent uses when an agent needs to register a Superior Trade account, verify an email OTP, configure x-api-key authentication, or recover from missing or invalid credentials before using…

    215 GitHub stars~950 tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Onchain Pay Open API

    npc-live/clawfirm

    Binance Onchain Pay enables users to buy cryptocurrency with fiat (e.g., EUR, USD) or send existing crypto from their Binance account directly to any external on-chain wallet address in a single…

    156 GitHub starsUsed in 1 repo~4.9k tokens
    Business, Finance & HRAuto-check passed
  • Alpaca Broker Integration

    alpacahq/alpaca-skills

    Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language.

    154 GitHub stars~3k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Miniqmt CLI

    oopslink/trading-skills

    Operate miniQMT/xtquant via the miniqmt-cli tool -- market data queries, real-time streaming, account management, order placement with safety guards, daemon health checks, SSH tunnel management, and…

    176 GitHub stars~8.2k tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed

More from alsk1992/CloddsBot

All 116 skills in this repo
  • Qmd

    alsk1992/CloddsBot

    Local hybrid search for markdown notes and docs. An agent skill from alsk1992/CloddsBot.

    3k GitHub starsUsed in 3 repos~1.2k tokens
    Auto-check passed
  • AI Strategy

    alsk1992/CloddsBot

    AI Strategy - natural language to trades. An agent skill from alsk1992/CloddsBot.

    3k GitHub stars~670 tokensUpdated 8 days ago
    Auto-check passed
  • Alerts

    alsk1992/CloddsBot

    Create and manage price alerts for prediction markets. An agent skill from alsk1992/CloddsBot.

    3k GitHub stars~460 tokensUpdated 8 days ago
    Auto-check passed
  • Analytics

    alsk1992/CloddsBot

    Performance attribution, trade analytics, and strategy optimization

    3k GitHub stars~1.6k tokensUpdated 8 days ago
    Auto-check passed
  • Arbitrage

    alsk1992/CloddsBot

    Automated cross-platform arbitrage detection and monitoring. An agent skill from alsk1992/CloddsBot.

    3k GitHub stars~1.7k tokensUpdated 8 days ago
    Auto-check passed
  • Auto Reply

    alsk1992/CloddsBot

    Automatic response rules, patterns, and scheduled messages. An agent skill from alsk1992/CloddsBot.

    3k GitHub stars~1.5k tokensUpdated 8 days ago
    Auto-check passed

Questions about Trading Manifold

What does Trading Manifold do?

Place bets on Manifold Markets using their REST API. An agent skill from alsk1992/CloddsBot. Trading Manifold is an agent skill from alsk1992/CloddsBot.

When should I use Trading Manifold?

Trading Manifold fits situations like: tasks that involve Trading and backtesting; tasks that involve REST APIs.

How do I install Trading Manifold in Claude Code?

Run `npx skills add alsk1992/CloddsBot --skill trading-manifold -a claude-code`. Or copy the skill folder (src/skills/bundled/trading-manifold in alsk1992/CloddsBot) into .claude/skills/trading-manifold in your project. Claude Code loads it when a task matches its description.

How do I install Trading Manifold in Codex?

Run `npx skills add alsk1992/CloddsBot --skill trading-manifold -a codex`. Or copy the skill folder (src/skills/bundled/trading-manifold in alsk1992/CloddsBot) into .agents/skills/trading-manifold in your project. Codex loads it when a task matches its description.

Can I use Trading Manifold in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alsk1992/CloddsBot --skill trading-manifold -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trading-manifold, .gemini/skills/trading-manifold, .github/skills/trading-manifold and .opencode/skills/trading-manifold in your project.

What does Trading Manifold need to run?

Going by SKILL.md and its folder, Trading Manifold needs TypeScript for the scripts in its folder and credentials named API_KEY and MANIFOLD_API_KEY. Our summary lists: Python 3; Node.js; A credential in MANIFOLD_API_KEY; A credential in API_KEY.

Does Trading Manifold access the network?

SKILL.md names 2 domains. In commands or code: api.manifold.markets; the agent is likely to contact it when it follows the instructions. As links in the text: manifold.markets. This is read from the text; nothing was executed.

Is Trading Manifold safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Trading Manifold use?

Trading Manifold is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Trading Manifold use?

About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Trading Manifold?

Skills that share tags, products or a category with Trading Manifold: Bankr Signals (aAAaqwq/AGI-Super-Team, 105 stars), Bankr (aAAaqwq/AGI-Super-Team, 105 stars), Superior Trade Auth (Superior-Trade/superior-skills, 215 stars) and Onchain Pay Open API (npc-live/clawfirm, 156 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trading Manifold?

alsk1992 (a GitHub user) maintains it in alsk1992/CloddsBot, which has 2,951 GitHub stars. The repository holds 116 skills in this directory. The repository was last updated on October 2, 2026.

Source: alsk1992/CloddsBot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.