New
Apps 6,279Makers 6,258This week 13
Promote your app−30%
uselayer screenshot 1
5views in
the last 30 days

uselayer

Trade Kalshi and Polymarket US prediction markets from Python with your own keys

Built with Claude Code

by uselayer · Unclaimed · added Oct 29, 2026
no ratings0 comments

uselayer

Trade prediction markets on Kalshi and Polymarket US from Python, with your own venue keys.

One order shape for every venue. Paper mode by default: real order books, simulated money. Guardrails on every order. Fee math that matches each venue's published schedule to the millionth of a dollar. Everything runs on your machine.

Website · Docs · PyPI · Example bot

pip install uselayer      # Python 3.11+
from uselayer import Client

client = Client()  # paper mode: real books, simulated fills
m = client.markets(limit=20)[0]  # open Polymarket US markets, no key needed
book = client.book(m.slug)
order = client.order(
    venue="polymarket_us", market=m.slug, side="yes", price=book.outcome("yes").best_ask.price, size=5
)
print(client.preview(order))  # fill, fees, every rule's decision
print(client.send(order))  # the order, filled against the book

What it does

  • Three modes, one API. Paper (the default) fills against live books with fake money. Live sends orders with your Kalshi or Polymarket US key, or both. Backtest replays books you saved or data you import.
  • The cheaper venue for each order. With a Layer API key, client.matches() returns markets that are the same bet on both venues, and buy_best() places your order on whichever is cheaper after fees. Give it contracts, or a dollar amount (spend=50) and it buys where that money wins more.
  • Both sides of a gap. quote() prices a cross-venue pair after fees, depth and return per day; trade() buys both sides only if the gap is still there.
  • Trader data. client.whales reads traders on Polymarket and Kalshi from public data, with no key: leaderboards, what they hold, their trades and their profit history. See Trader data.
  • Guardrails. Position size, budget, daily loss, allowed markets, approvals, stop-loss and take-profit. A price collar, an order throttle and a kill switch are always on.
  • Your keys stay yours. Venue requests are signed locally. Layer only ever sees your Layer key, the market ids it gave you and your search filters: no prices, orders, positions or venue keys. No telemetry.

In this repo

MIT licensed.

Description taken from the repository README.

Ratings

–
0 ratings
5 0
4 0
3 0
2 0
1 0

Rate this app

Sign in to rate

Comments 0

Sign in to comment

No comments yet.

Related apps

#prediction-markets · #trading · #python