agentleFS
hmesutozsoyhmesutozsoy/oddsrail/llms.txt

oddsrail

llms.txt1 starsChanged 2 months agoMITView on GitHub

Open-source (MIT) MCP server that gives AI agents Polymarket and Kalshi market data, book-walked trade costs, a deterministic pre-trade check and non-custodial order routing. Self-hosted: it starts in dry-run (paper) mode and private keys never leave the operator's machine. Informational tools, not financial advice. The operator decides every order. Prediction markets are restricted in many jurisdictions, and the operator is responsible for their own eligibility. oddsrail is independent and is not affiliated with or endorsed by Polymarket or Kalshi. -…

  • Installs packages

The file

We split this llms.txt into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read tools need no keys. Live trading needs POLYMARKET_PRIVATE_KEY and ODDSRAIL_DRY_RUN set to 0, false or no.

    line 17
  2. Very specific:

    Call check_order with a short paraphrase of the order (market and outcome) as intent before each place_order.

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 4,067 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
llms.txt
# oddsrail

> Open-source (MIT) MCP server that gives AI agents Polymarket and Kalshi
> market data, book-walked trade costs, a deterministic pre-trade check and
> non-custodial order routing. Self-hosted: it starts in dry-run (paper)
> mode and private keys never leave the operator's machine.

Informational tools, not financial advice. The operator decides every order.
Prediction markets are restricted in many jurisdictions, and the operator is
responsible for their own eligibility. oddsrail is independent and is not
affiliated with or endorsed by Polymarket or Kalshi.

## Install

- `pip install oddsrail`, then configure your MCP client with the local stdio
  command `oddsrail` and no arguments (or `uvx oddsrail`).
- Read tools need no keys. Live trading needs `POLYMARKET_PRIVATE_KEY` and
  `ODDSRAIL_DRY_RUN` set to `0`, `false` or `no`; any other value stays in
  dry-run.

## The 42 tools on the local server, by group

- Polymarket market data (read-only, no keys): `search_markets`,
  `get_market`, `get_orderbook` (best-first), `price_history`,
  `get_positions`, `watch_book` (bounded realtime), `resolution_criteria`,
  `closing_soon`
- Cross-venue: `find_markets`, `quote_cost` (walks the book: average fill,
  slippage, notional, fillable), `compare_venues` (same-event candidates, not
  arbitrage), `settlement_audit`
- Signals and sizing (free): `overshoot_signal` (fresh price jumps and the
  median reversion of earlier jumps in the same window), `dispute_risk` (0 to 100 score for a contested
  resolution, with reasons), `position_size` (capped fractional Kelly)
- Pre-trade check: `check_order` compares a proposed order with a
  short paraphrase of the requested order (market and outcome), the live market and the guardrails, and returns
  ok / caution / block with evidence. It is opt-in: the agent calls it before
  `place_order`; it never runs automatically and sends nothing.
- Trading (dry-run by default): `place_order`, `cancel_order`, `open_orders`,
  `order_status`, `cancel_all_orders`
- Operator account reads: `my_fills`, `my_positions`, `my_balance`,
  `redeemable_positions`
- Gasless position management with the operator's own relayer key:
  `split_position`, `merge_positions`, `redeem_positions`
- Paper trading: `paper_positions`, `paper_reset`
- Attribution: `builder_stats`, `attribution_ledger`
- Kalshi (private endpoints need the operator's own Kalshi key):
  `kalshi_search_markets`, `kalshi_get_market`, `kalshi_get_orderbook`,
  `kalshi_get_trades`, `kalshi_balance`, `kalshi_positions`,
  `kalshi_open_orders`, `kalshi_place_order`, `kalshi_cancel_order`
- Status: `server_info` (mode, builder code in use, guardrails, venue
  reachability and Polymarket's advisory geoblock verdict for this machine)

Workflow prompts: `find_fade_setup`, `check_cross_venue_edge`,
`settle_resolved`, `daily_review`.

## Notes for agents

- Prices are implied probabilities in (0,1) on both venues, not cents.
  Polymarket `size` is in shares, and the exchange enforces a $1 minimum
  notional on marketable orders.
- `place_order` returns `{"dry_run": true, ...}` unless the operator enabled
  live trading; check this before assuming an order was placed.
- Call `check_order` with a short paraphrase of the order (market and
  outcome) as `intent` before each `place_order`. Nothing calls it for you.
- Operator guardrails (`ODDSRAIL_MAX_ORDER_NOTIONAL`,
  `ODDSRAIL_MAX_SESSION_NOTIONAL`, `ODDSRAIL_MAX_OPEN_ORDERS`,
  `ODDSRAIL_ALLOWED_MARKETS`) cannot be changed by the agent. The per-order
  cap and the allowed markets apply in dry-run too; the session cap and the
  open-order cap count live orders only.
- In dry-run, Polymarket orders fill against the live book into a local
  paper ledger. Paper results assume no queue, no impact and no fees, so they
  are an upper bound.
- Geography affects trading, not reading. Polymarket restricts order
  placement by jurisdiction (https://docs.polymarket.com/api-reference/geoblock)
  and Kalshi's Member Agreement restricts an overlapping set, so the first
  failure is usually a rejected order, not a connection error. `server_info`
  reports an advisory verdict; it is not a compliance check.
- Errors come back structured: `{error, error_type, http_status, url,
  failure_class, hint}`. Do not retry in a loop on `geo_blocked`,
  `unreachable`, `intercepted` or `local_tls`.

## Attribution and cost

By default, Polymarket orders carry oddsrail's builder code, registered at
0 bps, so nothing is added to the trade. Setting `ODDSRAIL_BUILDER_CODE`
replaces it with the operator's own code. `server_info` reports which code is
in use. Every tool is free; no paid tier is offered.

## Hosted connector (paper only)

https://mcp.oddsrail.app/mcp is a remote MCP endpoint with accounts: OAuth,
sign-in by email link. It is paper trading only: its tools use no wallet
keys, send no real order and serve no Kalshi tools. Each account gets a paper
ledger with a virtual $1,000 bankroll, filled against the live Polymarket
book. It serves 22 tools: `search_markets`, `find_markets`, `get_market`,
`get_orderbook`, `price_history`, `watch_book`, `closing_soon`,
`resolution_criteria`, `get_positions`, `overshoot_signal`, `dispute_risk`,
`quote_cost`, `position_size`, `check_order`, `place_order` (paper),
`cancel_order`, `paper_positions`, `paper_reset`, `server_info`, and
`arena_register`, `arena_unregister`, `arena_status` for an optional public
board of paper ledgers. Live trading is self-hosted only. Setup, example
prompts and troubleshooting: https://oddsrail.app/docs#hosted-connector

## Privacy

The local server sends no telemetry and contacts only the venue hosts listed
in the README. The hosted connector's privacy policy:
https://oddsrail.app/privacy

## Links

- Source and README: https://github.com/hmesutozsoy/oddsrail
- Security reports: https://github.com/hmesutozsoy/oddsrail/blob/main/SECURITY.md
- PyPI: https://pypi.org/project/oddsrail/
- Documentation: https://oddsrail.app/docs
- Changelog: https://github.com/hmesutozsoy/oddsrail/blob/main/CHANGELOG.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.