{"at":"2026-11-23T02:27:52.243Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T02:27:53.937Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"oracle3","version":"1.2.2","websiteUrl":"https://yichengyang-ethan.github.io/oracle3-prediction-market-agent/"}},"cacheScope":"private","capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":true},"tools":{"listChanged":true}},"instructions":"Oracle3 gives read access to Kalshi and Polymarket and checks whether prices of\nrelated contracts violate the axioms of probability after venue fees.\n\nPrices are dollars per contract, between 0 and 1. No tool places a real order;\npaper_order fills against the live order book into a local paper ledger.\n\nTypical flow: search_markets -> get_quote or get_orderbook on candidates ->\ncheck_constraint_live with the relation you believe holds -> paper_order the\nlegs of the best basket.\n\nRelations: implication (A implies B), exclusivity (at most one outcome),\ncomplement (exactly one of two), same_event (one event on two venues),\nevent_sum (exactly one of n). Whether a relation actually holds is your\njudgment; read both markets' resolution rules before relying on a result.\n\nFees follow each market's own schedule from the venue API: Kalshi taker\n0.07*M*C*P*(1-P) (maker 0.0175*M*C*P*(1-P) only on series with maker fees),\nPolymarket taker rate*C*p*(1-p), Polymarket makers free.\n","resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-23T02:27:53.937Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T02:27:53.939Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"oracle3","version":"1.2.2","websiteUrl":"https://yichengyang-ethan.github.io/oracle3-prediction-market-agent/"}},"cacheScope":"private","resultType":"complete","tools":[{"annotations":{"openWorldHint":true,"readOnlyHint":true},"description":"Search open Kalshi or Polymarket markets and return candidates with their best prices.\n\nStart here to find market ids, then call get_quote or get_orderbook for live\nprices, or get_market for resolution details. Reads the venues' public APIs,\nso no account or API key is needed; Kalshi keyword search scans up to 1,000\nopen events. Returns {venue, query, count, markets}; each market has\nmarket_id, title, best bid and ask in dollars, volume and closing date.\n","inputSchema":{"properties":{"limit":{"default":20,"description":"Maximum markets to return, 1-100 (clamped). Default 20.","title":"Limit","type":"integer"},"query":{"default":"","description":"Case-insensitive keywords matched against event titles, market titles and (on Kalshi) tickers. Empty lists open markets without a keyword filter.","title":"Query","type":"string"},"series_ticker":{"default":"","description":"Kalshi only: list the open markets of this series (e.g. KXFEDDECISION) instead of searching by keyword; query is then ignored. Ignored on Polymarket.","title":"Series Ticker","type":"string"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue"],"title":"search_marketsArguments","type":"object"},"name":"search_markets","outputSchema":{"additionalProperties":true,"title":"search_marketsDictOutput","type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true},"description":"Get one market's details: title, best bid and ask, volume and closing date.\n\nKalshi results include the resolution rules (rules_primary, rules_secondary);\nPolymarket results include the outcomes, token ids, neg-risk flag and the\nmarket's fee schedule. Read the rules of every leg here before trusting a\nrelation in check_constraint_live. For prices plus fee terms only, use\nget_quote; for depth, use get_orderbook. Public data, no API key.\n","inputSchema":{"properties":{"market_id":{"description":"Kalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets.","title":"Market Id","type":"string"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","market_id"],"title":"get_marketArguments","type":"object"},"name":"get_market","outputSchema":{"additionalProperties":true,"title":"get_marketDictOutput","type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true},"description":"Get the displayed order book for YES and NO as [price, size] levels, best first.\n\nPrices are dollars per contract and sizes are contracts. Use it to see how\nmuch of a basket can fill near the quoted price before paper_order; use\nget_quote when only the top of book matters. Kalshi publishes bids only, so\neach side's asks are derived from the other side's bids (a YES ask of p is a\nNO bid of 1 - p). Public data, no API key.\n","inputSchema":{"properties":{"depth":{"default":10,"description":"Price levels per side, 1-50 (clamped). Default 10.","title":"Depth","type":"integer"},"market_id":{"description":"Kalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets.","title":"Market Id","type":"string"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","market_id"],"title":"get_orderbookArguments","type":"object"},"name":"get_orderbook","outputSchema":{"additionalProperties":true,"title":"get_orderbookDictOutput","type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true},"description":"Get the best bid and ask on YES and NO, in dollars, plus the market's fee schedule.\n\nUse it to collect prices for check_constraint, or to read the fee terms\n(Kalshi multiplier and maker fees, Polymarket taker rate) that trading_fee\ntakes. check_constraint_live fetches quotes itself, so this is not needed\nbefore calling it. A missing ask is derived from the opposite side's bid.\nReturns {venue, market_id, title, yes_bid, yes_ask, no_bid, no_ask,\nfee_schedule}. Public data, no API key.\n","inputSchema":{"properties":{"market_id":{"description":"Kalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets.","title":"Market Id","type":"string"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","market_id"],"title":"get_quoteArguments","type":"object"},"name":"get_quote","outputSchema":{"additionalProperties":true,"title":"get_quoteDictOutput","type":"object"}},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Compute the venue fee for one fill at a given price and size; a pure calculation with no network calls.\n\nKalshi charges round_up(0.07 x M x C x P x (1 - P)) on taker fills, and\n0.0175 x M x C x P x (1 - P) on maker fills where the series has maker fees;\nPolymarket charges takers rate x C x p x (1 - p) and makers nothing. Use it\nto price a single leg or a hypothetical fill; take a live market's fee terms\nfrom get_quote, and use check_constraint to price a whole basket. Returns\nfee, fee_per_contract, order_type and the schedule used.\n","inputSchema":{"properties":{"contracts":{"description":"Contracts in the fill; must be positive.","title":"Contracts","type":"number"},"kalshi_maker_fees":{"default":false,"description":"Whether the Kalshi series charges maker fees, from get_quote (default false). Ignored for Polymarket.","title":"Kalshi Maker Fees","type":"boolean"},"kalshi_multiplier":{"default":1.0,"description":"Kalshi series fee multiplier M, from get_quote's fee_schedule (default 1). Ignored for Polymarket.","title":"Kalshi Multiplier","type":"number"},"maker":{"default":false,"description":"Price a resting maker order instead of a taker order (default false).","title":"Maker","type":"boolean"},"polymarket_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Polymarket taker fee rate for the market, from get_quote. Defaults to 0.07, the highest documented rate. Ignored for Kalshi.","title":"Polymarket Rate"},"price":{"description":"Fill price in dollars per contract, strictly between 0 and 1.","title":"Price","type":"number"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","price","contracts"],"title":"trading_feeArguments","type":"object"},"name":"trading_fee","outputSchema":{"additionalProperties":true,"title":"trading_feeDictOutput","type":"object"}},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Check offline whether prices you supply violate a no-arbitrage relation, and price the cheapest exploiting basket after fees.\n\nA pure calculation with no network calls: use it for hypothetical or\nhistorical prices, and use check_constraint_live to fetch current quotes\ninstead. Returns violated, profitable_after_fees, the best basket (legs,\ncost, guaranteed payoff, fees, gross and net edge), every candidate basket,\nany missing quotes, and the assumptions behind the check (full fills at the\nquoted prices, a correctly specified relation).\n","inputSchema":{"$defs":{"QuoteInput":{"description":"One contract's prices in dollars per contract. A missing ask is derived from the opposite side's bid.","properties":{"kalshi_maker_fees":{"default":false,"description":"Whether the Kalshi series charges maker fees, from get_quote.","title":"Kalshi Maker Fees","type":"boolean"},"kalshi_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Kalshi series fee multiplier M, from get_quote (default 1).","title":"Kalshi Multiplier"},"market_id":{"description":"Label for this contract in the result, such as its ticker or market id.","title":"Market Id","type":"string"},"no_ask":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Best NO ask in dollars (0-1). If omitted, 1 - yes_bid is used.","title":"No Ask"},"no_bid":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Best NO bid in dollars (0-1).","title":"No Bid"},"polymarket_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Polymarket taker fee rate for this market (default: 0.07, the highest documented rate).","title":"Polymarket Rate"},"venue":{"default":"kalshi","description":"Venue whose fee schedule applies: 'kalshi' (default) or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"},"yes_ask":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Best YES ask in dollars (0-1). If omitted, 1 - no_bid is used.","title":"Yes Ask"},"yes_bid":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Best YES bid in dollars (0-1).","title":"Yes Bid"}},"required":["market_id"],"title":"QuoteInput","type":"object"}},"properties":{"contracts":{"default":1.0,"description":"Contracts bought on every leg (default 1). Fees scale with size.","title":"Contracts","type":"number"},"maker":{"default":false,"description":"Price fees as resting maker orders instead of taker orders (default false). Maker fees are lower or zero, but a resting order may not fill.","title":"Maker","type":"boolean"},"quotes":{"description":"One quote per contract, in the order the relation expects: implication (A, B) where A implies B; complement and same_event (A, B); exclusivity and event_sum every outcome.","items":{"$ref":"#/$defs/QuoteInput"},"title":"Quotes","type":"array"},"relation":{"description":"Bound to test: implication (A implies B, so P(A) <= P(B)), exclusivity (at most one outcome happens), complement (exactly one of two), same_event (one event quoted on two venues) or event_sum (exactly one of n). See list_relation_types.","enum":["implication","exclusivity","complement","same_event","event_sum"],"title":"Relation","type":"string"}},"required":["relation","quotes"],"title":"check_constraintArguments","type":"object"},"name":"check_constraint","outputSchema":{"additionalProperties":true,"title":"check_constraintDictOutput","type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true},"description":"Fetch live quotes and fee schedules for related markets, then check whether their prices violate a no-arbitrage relation after fees.\n\nThis is the main research call: find related contracts with search_markets,\nconfirm with get_market that their resolution rules really satisfy the\nrelation, then pass them here. Read-only: it calls the venues' public APIs\nand places no orders. Returns the check_constraint result (violated,\nprofitable_after_fees, best basket with net edge) plus the quotes it used;\nto simulate the trade, call paper_order for each leg of the best basket.\n","inputSchema":{"$defs":{"MarketRef":{"description":"A live market to check, identified by venue and market id.","properties":{"market_id":{"description":"Kalshi ticker or Polymarket market id, as returned by search_markets.","title":"Market Id","type":"string"},"venue":{"description":"'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","market_id"],"title":"MarketRef","type":"object"}},"properties":{"contracts":{"default":1.0,"description":"Contracts bought on every leg (default 1). Fees scale with size.","title":"Contracts","type":"number"},"maker":{"default":false,"description":"Price fees as resting maker orders instead of taker orders (default false). Maker fees are lower or zero, but a resting order may not fill.","title":"Maker","type":"boolean"},"markets":{"description":"Markets to check, each {venue, market_id}, in the order the relation expects: two for implication (A then B), complement and same_event; every outcome for exclusivity and event_sum. Venues may be mixed.","items":{"$ref":"#/$defs/MarketRef"},"title":"Markets","type":"array"},"relation":{"description":"Bound to test: implication (A implies B, so P(A) <= P(B)), exclusivity (at most one outcome happens), complement (exactly one of two), same_event (one event quoted on two venues) or event_sum (exactly one of n). See list_relation_types.","enum":["implication","exclusivity","complement","same_event","event_sum"],"title":"Relation","type":"string"}},"required":["relation","markets"],"title":"check_constraint_liveArguments","type":"object"},"name":"check_constraint_live","outputSchema":{"additionalProperties":true,"title":"check_constraint_liveDictOutput","type":"object"}},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"List the relation types the constraint checks support and the probability bound each enforces.\n\nStatic reference data with no network or file access, for example\nimplication: P(A) <= P(B). Use it to choose the relation argument of\ncheck_constraint or check_constraint_live; to see concrete market pairs\nsaved on this machine, use list_relations instead. Returns\n{relations: {name: bound}}.\n","inputSchema":{"properties":{},"title":"list_relation_typesArguments","type":"object"},"name":"list_relation_types","outputSchema":{"additionalProperties":true,"title":"list_relation_typesDictOutput","type":"object"}},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Convert a market price into the probability it implies under the Wang transform, and report the premium.\n\nSolves p_mkt = Phi(Phi^-1(p) + lam) for p; a pure calculation with no network\ncalls. Use it to strip the favourite-longshot premium from a quoted price\nbefore comparing it with your own forecast. The default lam = 0.183 is the\npooled estimate in Yang (2026), SSRN 6468338; it pools real-money and\nplay-money venues, so treat it as illustrative. Returns market_price,\nlambda, implied_probability and premium (price minus implied probability).\n","inputSchema":{"properties":{"lam":{"default":0.183,"description":"Pricing-wedge parameter lambda of the Wang transform. Positive values mean prices sit above the true probability, most of all for longshots. Default 0.183.","title":"Lam","type":"number"},"market_price":{"description":"Observed YES price in dollars, strictly between 0 and 1.","title":"Market Price","type":"number"}},"required":["market_price"],"title":"fair_valueArguments","type":"object"},"name":"fair_value","outputSchema":{"additionalProperties":true,"title":"fair_valueDictOutput","type":"object"}},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"List the market relations saved on this machine by the oracle3 research CLI, optionally filtered.\n\nReads ~/.oracle3/relations.json with no network calls. Use it to reuse pairs\nalready discovered or validated offline, then pass a pair to\ncheck_constraint_live. For the abstract relation kinds and their bounds,\ncall list_relation_types instead. Returns the store path, a count and the\nmatching relations (markets, type, status and validation details); the list\nis empty if the CLI has saved none.\n","inputSchema":{"properties":{"market_id":{"default":"","description":"Only relations that include this market id (Kalshi ticker or Polymarket id). Empty returns all.","title":"Market Id","type":"string"},"spread_type":{"default":"","description":"Only this relation type: same_event, cross_platform, implication, exclusivity, conditional, structural, cointegration or complement. Empty returns all.","title":"Spread Type","type":"string"},"status":{"default":"","description":"Only this lifecycle status: discovered, validated, deployed, retired or invalidated. Empty returns all.","title":"Status","type":"string"}},"title":"list_relationsArguments","type":"object"},"name":"list_relations","outputSchema":{"additionalProperties":true,"title":"list_relationsDictOutput","type":"object"}},{"annotations":{"destructiveHint":false,"openWorldHint":true,"readOnlyHint":false},"description":"Simulate buying YES or NO contracts in the local paper ledger, filling against the live order book with venue fees. Never sends an order to a venue.\n\nWalks the displayed asks from the best price up to limit_price and charges\nthe venue fee on each level. Use it to test the legs of a basket found by\ncheck_constraint_live. Writes ~/.oracle3/mcp_paper_ledger.json (or the path\nin ORACLE3_MCP_LEDGER); only buys are supported and positions are held at\ncost. Returns status (filled, partially_filled, unfilled, or rejected when\npaper cash is short), requested and filled contracts, average price, cost,\nfees and the per-level fills.\n","inputSchema":{"properties":{"contracts":{"description":"Contracts to buy; must be positive.","title":"Contracts","type":"number"},"limit_price":{"description":"Highest price per contract to pay, in dollars, strictly between 0 and 1; ask levels above it are skipped.","title":"Limit Price","type":"number"},"market_id":{"description":"Kalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets.","title":"Market Id","type":"string"},"side":{"description":"Side of the binary contract to buy: 'yes' or 'no'.","enum":["yes","no"],"title":"Side","type":"string"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","market_id","side","contracts","limit_price"],"title":"paper_orderArguments","type":"object"},"name":"paper_order","outputSchema":{"additionalProperties":true,"title":"paper_orderDictOutput","type":"object"}},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Show the local paper ledger: cash, open positions and the number of fills.\n\nReads ~/.oracle3/mcp_paper_ledger.json (or ORACLE3_MCP_LEDGER) with no\nnetwork calls. Use it after paper_order to confirm fills and remaining cash.\nStarting cash is $10,000; positions are carried at cost, and the ledger does\nnot mark to market or track resolution. Returns the ledger path,\ninitial_cash, cash, positions and fills.\n","inputSchema":{"properties":{},"title":"paper_portfolioArguments","type":"object"},"name":"paper_portfolio","outputSchema":{"additionalProperties":true,"title":"paper_portfolioDictOutput","type":"object"}},{"annotations":{"destructiveHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Erase the local paper ledger and restore the $10,000 starting cash.\n\nDeletes all paper positions and fill history; no venue is contacted and real\naccounts are never touched. Without confirm=true it returns status\nnot_reset and changes nothing. Use it to start a fresh paper-trading\nsession.\n","inputSchema":{"properties":{"confirm":{"default":false,"description":"Must be true to erase the ledger; otherwise nothing changes.","title":"Confirm","type":"boolean"}},"title":"paper_resetArguments","type":"object"},"name":"paper_reset","outputSchema":{"additionalProperties":true,"title":"paper_resetDictOutput","type":"object"}}],"ttlMs":0}}}
{"at":"2026-11-23T02:27:54.140Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T02:27:55.788Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":false},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"instructions":"Oracle3 gives read access to Kalshi and Polymarket and checks whether prices of\nrelated contracts violate the axioms of probability after venue fees.\n\nPrices are dollars per contract, between 0 and 1. No tool places a real order;\npaper_order fills against the live order book into a local paper ledger.\n\nTypical flow: search_markets -> get_quote or get_orderbook on candidates ->\ncheck_constraint_live with the relation you believe holds -> paper_order the\nlegs of the best basket.\n\nRelations: implication (A implies B), exclusivity (at most one outcome),\ncomplement (exactly one of two), same_event (one event on two venues),\nevent_sum (exactly one of n). Whether a relation actually holds is your\njudgment; read both markets' resolution rules before relying on a result.\n\nFees follow each market's own schedule from the venue API: Kalshi taker\n0.07*M*C*P*(1-P) (maker 0.0175*M*C*P*(1-P) only on series with maker fees),\nPolymarket taker rate*C*p*(1-p), Polymarket makers free.\n","protocolVersion":"2025-11-25","serverInfo":{"name":"oracle3","version":"1.2.2","websiteUrl":"https://yichengyang-ethan.github.io/oracle3-prediction-market-agent/"}}}}
{"at":"2026-11-23T02:27:55.788Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T02:27:55.788Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T02:27:55.790Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"openWorldHint":true,"readOnlyHint":true},"description":"Search open Kalshi or Polymarket markets and return candidates with their best prices.\n\nStart here to find market ids, then call get_quote or get_orderbook for live\nprices, or get_market for resolution details. Reads the venues' public APIs,\nso no account or API key is needed; Kalshi keyword search scans up to 1,000\nopen events. Returns {venue, query, count, markets}; each market has\nmarket_id, title, best bid and ask in dollars, volume and closing date.\n","inputSchema":{"properties":{"limit":{"default":20,"description":"Maximum markets to return, 1-100 (clamped). Default 20.","title":"Limit","type":"integer"},"query":{"default":"","description":"Case-insensitive keywords matched against event titles, market titles and (on Kalshi) tickers. Empty lists open markets without a keyword filter.","title":"Query","type":"string"},"series_ticker":{"default":"","description":"Kalshi only: list the open markets of this series (e.g. KXFEDDECISION) instead of searching by keyword; query is then ignored. Ignored on Polymarket.","title":"Series Ticker","type":"string"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue"],"title":"search_marketsArguments","type":"object"},"name":"search_markets","outputSchema":{"additionalProperties":true,"title":"search_marketsDictOutput","type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true},"description":"Get one market's details: title, best bid and ask, volume and closing date.\n\nKalshi results include the resolution rules (rules_primary, rules_secondary);\nPolymarket results include the outcomes, token ids, neg-risk flag and the\nmarket's fee schedule. Read the rules of every leg here before trusting a\nrelation in check_constraint_live. For prices plus fee terms only, use\nget_quote; for depth, use get_orderbook. Public data, no API key.\n","inputSchema":{"properties":{"market_id":{"description":"Kalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets.","title":"Market Id","type":"string"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","market_id"],"title":"get_marketArguments","type":"object"},"name":"get_market","outputSchema":{"additionalProperties":true,"title":"get_marketDictOutput","type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true},"description":"Get the displayed order book for YES and NO as [price, size] levels, best first.\n\nPrices are dollars per contract and sizes are contracts. Use it to see how\nmuch of a basket can fill near the quoted price before paper_order; use\nget_quote when only the top of book matters. Kalshi publishes bids only, so\neach side's asks are derived from the other side's bids (a YES ask of p is a\nNO bid of 1 - p). Public data, no API key.\n","inputSchema":{"properties":{"depth":{"default":10,"description":"Price levels per side, 1-50 (clamped). Default 10.","title":"Depth","type":"integer"},"market_id":{"description":"Kalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets.","title":"Market Id","type":"string"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","market_id"],"title":"get_orderbookArguments","type":"object"},"name":"get_orderbook","outputSchema":{"additionalProperties":true,"title":"get_orderbookDictOutput","type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true},"description":"Get the best bid and ask on YES and NO, in dollars, plus the market's fee schedule.\n\nUse it to collect prices for check_constraint, or to read the fee terms\n(Kalshi multiplier and maker fees, Polymarket taker rate) that trading_fee\ntakes. check_constraint_live fetches quotes itself, so this is not needed\nbefore calling it. A missing ask is derived from the opposite side's bid.\nReturns {venue, market_id, title, yes_bid, yes_ask, no_bid, no_ask,\nfee_schedule}. Public data, no API key.\n","inputSchema":{"properties":{"market_id":{"description":"Kalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets.","title":"Market Id","type":"string"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","market_id"],"title":"get_quoteArguments","type":"object"},"name":"get_quote","outputSchema":{"additionalProperties":true,"title":"get_quoteDictOutput","type":"object"}},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Compute the venue fee for one fill at a given price and size; a pure calculation with no network calls.\n\nKalshi charges round_up(0.07 x M x C x P x (1 - P)) on taker fills, and\n0.0175 x M x C x P x (1 - P) on maker fills where the series has maker fees;\nPolymarket charges takers rate x C x p x (1 - p) and makers nothing. Use it\nto price a single leg or a hypothetical fill; take a live market's fee terms\nfrom get_quote, and use check_constraint to price a whole basket. Returns\nfee, fee_per_contract, order_type and the schedule used.\n","inputSchema":{"properties":{"contracts":{"description":"Contracts in the fill; must be positive.","title":"Contracts","type":"number"},"kalshi_maker_fees":{"default":false,"description":"Whether the Kalshi series charges maker fees, from get_quote (default false). Ignored for Polymarket.","title":"Kalshi Maker Fees","type":"boolean"},"kalshi_multiplier":{"default":1.0,"description":"Kalshi series fee multiplier M, from get_quote's fee_schedule (default 1). Ignored for Polymarket.","title":"Kalshi Multiplier","type":"number"},"maker":{"default":false,"description":"Price a resting maker order instead of a taker order (default false).","title":"Maker","type":"boolean"},"polymarket_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Polymarket taker fee rate for the market, from get_quote. Defaults to 0.07, the highest documented rate. Ignored for Kalshi.","title":"Polymarket Rate"},"price":{"description":"Fill price in dollars per contract, strictly between 0 and 1.","title":"Price","type":"number"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","price","contracts"],"title":"trading_feeArguments","type":"object"},"name":"trading_fee","outputSchema":{"additionalProperties":true,"title":"trading_feeDictOutput","type":"object"}},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Check offline whether prices you supply violate a no-arbitrage relation, and price the cheapest exploiting basket after fees.\n\nA pure calculation with no network calls: use it for hypothetical or\nhistorical prices, and use check_constraint_live to fetch current quotes\ninstead. Returns violated, profitable_after_fees, the best basket (legs,\ncost, guaranteed payoff, fees, gross and net edge), every candidate basket,\nany missing quotes, and the assumptions behind the check (full fills at the\nquoted prices, a correctly specified relation).\n","inputSchema":{"$defs":{"QuoteInput":{"description":"One contract's prices in dollars per contract. A missing ask is derived from the opposite side's bid.","properties":{"kalshi_maker_fees":{"default":false,"description":"Whether the Kalshi series charges maker fees, from get_quote.","title":"Kalshi Maker Fees","type":"boolean"},"kalshi_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Kalshi series fee multiplier M, from get_quote (default 1).","title":"Kalshi Multiplier"},"market_id":{"description":"Label for this contract in the result, such as its ticker or market id.","title":"Market Id","type":"string"},"no_ask":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Best NO ask in dollars (0-1). If omitted, 1 - yes_bid is used.","title":"No Ask"},"no_bid":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Best NO bid in dollars (0-1).","title":"No Bid"},"polymarket_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Polymarket taker fee rate for this market (default: 0.07, the highest documented rate).","title":"Polymarket Rate"},"venue":{"default":"kalshi","description":"Venue whose fee schedule applies: 'kalshi' (default) or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"},"yes_ask":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Best YES ask in dollars (0-1). If omitted, 1 - no_bid is used.","title":"Yes Ask"},"yes_bid":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Best YES bid in dollars (0-1).","title":"Yes Bid"}},"required":["market_id"],"title":"QuoteInput","type":"object"}},"properties":{"contracts":{"default":1.0,"description":"Contracts bought on every leg (default 1). Fees scale with size.","title":"Contracts","type":"number"},"maker":{"default":false,"description":"Price fees as resting maker orders instead of taker orders (default false). Maker fees are lower or zero, but a resting order may not fill.","title":"Maker","type":"boolean"},"quotes":{"description":"One quote per contract, in the order the relation expects: implication (A, B) where A implies B; complement and same_event (A, B); exclusivity and event_sum every outcome.","items":{"$ref":"#/$defs/QuoteInput"},"title":"Quotes","type":"array"},"relation":{"description":"Bound to test: implication (A implies B, so P(A) <= P(B)), exclusivity (at most one outcome happens), complement (exactly one of two), same_event (one event quoted on two venues) or event_sum (exactly one of n). See list_relation_types.","enum":["implication","exclusivity","complement","same_event","event_sum"],"title":"Relation","type":"string"}},"required":["relation","quotes"],"title":"check_constraintArguments","type":"object"},"name":"check_constraint","outputSchema":{"additionalProperties":true,"title":"check_constraintDictOutput","type":"object"}},{"annotations":{"openWorldHint":true,"readOnlyHint":true},"description":"Fetch live quotes and fee schedules for related markets, then check whether their prices violate a no-arbitrage relation after fees.\n\nThis is the main research call: find related contracts with search_markets,\nconfirm with get_market that their resolution rules really satisfy the\nrelation, then pass them here. Read-only: it calls the venues' public APIs\nand places no orders. Returns the check_constraint result (violated,\nprofitable_after_fees, best basket with net edge) plus the quotes it used;\nto simulate the trade, call paper_order for each leg of the best basket.\n","inputSchema":{"$defs":{"MarketRef":{"description":"A live market to check, identified by venue and market id.","properties":{"market_id":{"description":"Kalshi ticker or Polymarket market id, as returned by search_markets.","title":"Market Id","type":"string"},"venue":{"description":"'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","market_id"],"title":"MarketRef","type":"object"}},"properties":{"contracts":{"default":1.0,"description":"Contracts bought on every leg (default 1). Fees scale with size.","title":"Contracts","type":"number"},"maker":{"default":false,"description":"Price fees as resting maker orders instead of taker orders (default false). Maker fees are lower or zero, but a resting order may not fill.","title":"Maker","type":"boolean"},"markets":{"description":"Markets to check, each {venue, market_id}, in the order the relation expects: two for implication (A then B), complement and same_event; every outcome for exclusivity and event_sum. Venues may be mixed.","items":{"$ref":"#/$defs/MarketRef"},"title":"Markets","type":"array"},"relation":{"description":"Bound to test: implication (A implies B, so P(A) <= P(B)), exclusivity (at most one outcome happens), complement (exactly one of two), same_event (one event quoted on two venues) or event_sum (exactly one of n). See list_relation_types.","enum":["implication","exclusivity","complement","same_event","event_sum"],"title":"Relation","type":"string"}},"required":["relation","markets"],"title":"check_constraint_liveArguments","type":"object"},"name":"check_constraint_live","outputSchema":{"additionalProperties":true,"title":"check_constraint_liveDictOutput","type":"object"}},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"List the relation types the constraint checks support and the probability bound each enforces.\n\nStatic reference data with no network or file access, for example\nimplication: P(A) <= P(B). Use it to choose the relation argument of\ncheck_constraint or check_constraint_live; to see concrete market pairs\nsaved on this machine, use list_relations instead. Returns\n{relations: {name: bound}}.\n","inputSchema":{"properties":{},"title":"list_relation_typesArguments","type":"object"},"name":"list_relation_types","outputSchema":{"additionalProperties":true,"title":"list_relation_typesDictOutput","type":"object"}},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Convert a market price into the probability it implies under the Wang transform, and report the premium.\n\nSolves p_mkt = Phi(Phi^-1(p) + lam) for p; a pure calculation with no network\ncalls. Use it to strip the favourite-longshot premium from a quoted price\nbefore comparing it with your own forecast. The default lam = 0.183 is the\npooled estimate in Yang (2026), SSRN 6468338; it pools real-money and\nplay-money venues, so treat it as illustrative. Returns market_price,\nlambda, implied_probability and premium (price minus implied probability).\n","inputSchema":{"properties":{"lam":{"default":0.183,"description":"Pricing-wedge parameter lambda of the Wang transform. Positive values mean prices sit above the true probability, most of all for longshots. Default 0.183.","title":"Lam","type":"number"},"market_price":{"description":"Observed YES price in dollars, strictly between 0 and 1.","title":"Market Price","type":"number"}},"required":["market_price"],"title":"fair_valueArguments","type":"object"},"name":"fair_value","outputSchema":{"additionalProperties":true,"title":"fair_valueDictOutput","type":"object"}},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"List the market relations saved on this machine by the oracle3 research CLI, optionally filtered.\n\nReads ~/.oracle3/relations.json with no network calls. Use it to reuse pairs\nalready discovered or validated offline, then pass a pair to\ncheck_constraint_live. For the abstract relation kinds and their bounds,\ncall list_relation_types instead. Returns the store path, a count and the\nmatching relations (markets, type, status and validation details); the list\nis empty if the CLI has saved none.\n","inputSchema":{"properties":{"market_id":{"default":"","description":"Only relations that include this market id (Kalshi ticker or Polymarket id). Empty returns all.","title":"Market Id","type":"string"},"spread_type":{"default":"","description":"Only this relation type: same_event, cross_platform, implication, exclusivity, conditional, structural, cointegration or complement. Empty returns all.","title":"Spread Type","type":"string"},"status":{"default":"","description":"Only this lifecycle status: discovered, validated, deployed, retired or invalidated. Empty returns all.","title":"Status","type":"string"}},"title":"list_relationsArguments","type":"object"},"name":"list_relations","outputSchema":{"additionalProperties":true,"title":"list_relationsDictOutput","type":"object"}},{"annotations":{"destructiveHint":false,"openWorldHint":true,"readOnlyHint":false},"description":"Simulate buying YES or NO contracts in the local paper ledger, filling against the live order book with venue fees. Never sends an order to a venue.\n\nWalks the displayed asks from the best price up to limit_price and charges\nthe venue fee on each level. Use it to test the legs of a basket found by\ncheck_constraint_live. Writes ~/.oracle3/mcp_paper_ledger.json (or the path\nin ORACLE3_MCP_LEDGER); only buys are supported and positions are held at\ncost. Returns status (filled, partially_filled, unfilled, or rejected when\npaper cash is short), requested and filled contracts, average price, cost,\nfees and the per-level fills.\n","inputSchema":{"properties":{"contracts":{"description":"Contracts to buy; must be positive.","title":"Contracts","type":"number"},"limit_price":{"description":"Highest price per contract to pay, in dollars, strictly between 0 and 1; ask levels above it are skipped.","title":"Limit Price","type":"number"},"market_id":{"description":"Kalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets.","title":"Market Id","type":"string"},"side":{"description":"Side of the binary contract to buy: 'yes' or 'no'.","enum":["yes","no"],"title":"Side","type":"string"},"venue":{"description":"Venue: 'kalshi' or 'polymarket'.","enum":["kalshi","polymarket"],"title":"Venue","type":"string"}},"required":["venue","market_id","side","contracts","limit_price"],"title":"paper_orderArguments","type":"object"},"name":"paper_order","outputSchema":{"additionalProperties":true,"title":"paper_orderDictOutput","type":"object"}},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Show the local paper ledger: cash, open positions and the number of fills.\n\nReads ~/.oracle3/mcp_paper_ledger.json (or ORACLE3_MCP_LEDGER) with no\nnetwork calls. Use it after paper_order to confirm fills and remaining cash.\nStarting cash is $10,000; positions are carried at cost, and the ledger does\nnot mark to market or track resolution. Returns the ledger path,\ninitial_cash, cash, positions and fills.\n","inputSchema":{"properties":{},"title":"paper_portfolioArguments","type":"object"},"name":"paper_portfolio","outputSchema":{"additionalProperties":true,"title":"paper_portfolioDictOutput","type":"object"}},{"annotations":{"destructiveHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Erase the local paper ledger and restore the $10,000 starting cash.\n\nDeletes all paper positions and fill history; no venue is contacted and real\naccounts are never touched. Without confirm=true it returns status\nnot_reset and changes nothing. Use it to start a fresh paper-trading\nsession.\n","inputSchema":{"properties":{"confirm":{"default":false,"description":"Must be true to erase the ledger; otherwise nothing changes.","title":"Confirm","type":"boolean"}},"title":"paper_resetArguments","type":"object"},"name":"paper_reset","outputSchema":{"additionalProperties":true,"title":"paper_resetDictOutput","type":"object"}}]}}}
