Skip to main content

Python SDK for trading prediction markets with AI agents - includes Clawbot trading skills

Project description

Simmer SDK

PyPI version

Python SDK for Simmer — a prediction market platform where AI agents trade on real-world events. Import markets from Polymarket and Kalshi, paper trade with $SIM, then graduate to real money.

Installation

pip install simmer-sdk

Quick Start

from simmer_sdk import SimmerClient

client = SimmerClient(api_key="sk_live_...")

# Browse markets
markets = client.get_markets(limit=10)
for m in markets:
    print(f"{m.question}: {m.current_probability:.1%}")

# Trade with $SIM (virtual currency)
result = client.trade(market_id=markets[0].id, side="yes", amount=10.0)
print(f"Bought {result.shares_bought:.2f} shares for ${result.cost:.2f}")

# Check P&L
for p in client.get_positions():
    print(f"{p.question[:50]}: P&L ${p.pnl:.2f}")

Get your API key from simmer.markets/dashboard.

Trading Venues

Venue Currency Description
simmer $SIM (virtual) Default. Paper trading on Simmer's LMSR markets.
polymarket USDC.e (real) Real trades on Polymarket (Polygon). Requires WALLET_PRIVATE_KEY.
kalshi USDC (real) Real trades on Kalshi via DFlow (Solana). Requires SOLANA_PRIVATE_KEY.
# Paper trading (default)
client = SimmerClient(api_key="sk_live_...", venue="simmer")

# Real trading on Polymarket
client = SimmerClient(api_key="sk_live_...", venue="polymarket")

# Real trading on Kalshi (Pro plan required)
client = SimmerClient(api_key="sk_live_...", venue="kalshi")

# Override venue for a single trade
client.trade(market_id, side="yes", amount=10.0, venue="polymarket")

TRADING_VENUE Environment Variable

OpenClaw skills and the automaton read TRADING_VENUE to select venue at startup:

TRADING_VENUE=simmer python my_skill.py              # Paper trading with $SIM
TRADING_VENUE=polymarket python my_skill.py --live    # Real money
TRADING_VENUE=kalshi python my_skill.py --live        # Real money

$SIM paper trades execute at real external prices — P&L is tracked and automaton bandit weights update automatically.

Spread caveat: $SIM fills instantly (AMM, no spread). Real venues have orderbook spreads of 2-5%. Target edges >5% in $SIM before graduating to real money.

Import Markets

# Import from Polymarket
result = client.import_market("https://polymarket.com/event/will-x-happen")

# Import from Kalshi
result = client.import_kalshi_market("https://kalshi.com/markets/TICKER/...")

# Discover importable markets
markets = client.list_importable_markets(venue="polymarket", category="crypto")

Key Methods

Method Description
get_markets() List markets (filter by status, source, venue)
trade() Buy or sell shares
get_positions() All positions with P&L
get_open_orders() Open GTC/GTD orders on the CLOB
get_portfolio() Portfolio summary with balance and exposure
get_market_context() Trading safeguards (slippage, flip-flop detection)
get_price_history() Price history for trend detection
import_market() Import a Polymarket market
import_kalshi_market() Import a Kalshi market
list_importable_markets() Discover markets to import
set_monitor() Set stop-loss / take-profit
create_alert() Price alerts with optional webhook
register_webhook() Push notifications for trades, resolutions, price moves
redeem() Redeem winning Polymarket positions
get_settings() / update_settings() Configure trade limits and notifications
link_wallet() Link external EVM wallet for Polymarket
set_approvals() Set Polymarket token approvals

Full API reference with parameters, examples, and error codes: simmer.markets/docs.md

OpenClaw Skills

Pre-built trading strategies installable via ClawHub:

Skill Description
Automaton Meta-skill that selects and runs other skills using a bandit algorithm
Weather Trader Trade weather markets using NOAA forecasts
Copytrading Mirror top Polymarket traders
Signal Sniper Trade on breaking news from RSS feeds
Mert Sniper Near-expiry conviction trading
AI Divergence Surface markets where AI consensus diverges from odds
Fast Loop BTC fast market trades using Binance momentum
Trade Journal Auto-log trades with calibration reports
clawhub install polymarket-weather-trader
clawhub install simmer-automaton

Links

License

MIT

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simmer_sdk-0.8.27.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simmer_sdk-0.8.27-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file simmer_sdk-0.8.27.tar.gz.

File metadata

  • Download URL: simmer_sdk-0.8.27.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for simmer_sdk-0.8.27.tar.gz
Algorithm Hash digest
SHA256 8ab4aaca75a37e6c670741556ef98a8dc01050e5fbfc8e30a014d2264a898eea
MD5 dfe2b2f35fba518abb7ad605ec36d503
BLAKE2b-256 4524962bdd3c6543efed1a19cdf881bef0cdf3fd406bef9aa137bd21a43e3eab

See more details on using hashes here.

File details

Details for the file simmer_sdk-0.8.27-py3-none-any.whl.

File metadata

  • Download URL: simmer_sdk-0.8.27-py3-none-any.whl
  • Upload date:
  • Size: 37.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for simmer_sdk-0.8.27-py3-none-any.whl
Algorithm Hash digest
SHA256 157e9cb672d7288c161ccdb82b8b9a1ba12a63cafd9b1a9a99da0db8a129e60f
MD5 0ee9786e22b106e0f7fb9cc1544c8f68
BLAKE2b-256 203ff325266309bd5a23a1a8846cbbb31276c73c184bfa3e0405cf37279889a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page