Repository navigation
RFQ and combos: Polymarket US, Kalshi, Polymarket, SX Bet (experimental line) - #37
Merged
Merged
Conversation
Request-for-quote and combo trading for the terminal, on the experimental
order model (outcome + action). Plan and venue research: docs/rfq-combo.md.
- Models: Rfq, RfqQuote, Combo/ComboLeg, AcceptQuote, MakerQuote, status
enums, sizing by contracts or by amount (synpath/trading/money.py), and
capability keys rfq_taker, rfq_quoter and combos on every adapter.
- One typed interface on TradingExchange, implemented by:
- Polymarket US: taker, quoter, combos.
- Kalshi: taker, quoter, multivariate combos; accepted_side names the
maker's bid, so buying YES sends "no" (checked on the demo exchange).
- Polymarket: taker, quoter, combos, with Exchange v3 order signing
(matched against independently built EIP-712 vectors, incl. the
Deposit Wallet ERC-7739 wrap).
- SX Bet: the parlay quoter side.
- Engine (engine.rfq): accepts and confirms go through risk and are
journaled before the venue call; crash recovery reads the quote back;
fills land in positions; a combo is its own instrument; a side mismatch
alerts; halt cancels open RFQs and quotes. Incoming RFQs are pushed to
quoting callbacks where the venue streams them.
- serve: /trading/rfqs, /trading/quotes, /trading/combos and quote events
on /ws/events. Accept and confirm return 202 at once, 200 when waited.
Offline tests only; live runs are phase P10.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds request-for-quote and combo trading to the experimental line, on the outcome + action order model the terminal uses. It targets
codex/order-lifecycle-storage, nevermain.The plan, venue research and per-phase results are in
docs/rfq-combo.md.Venues
Limitless Packs (needs partner access), Smarkets, Betfair, Opinion, Hyperliquid and predict.fun are out of scope. The doc gives the reasons.
What's in it
Rfq,RfqQuote,Combo/ComboLeg,AcceptQuote,MakerQuote, plus status enums.synpath/trading/money.py).rfq_taker,rfq_quoterandcombos.TradingExchange. Accept side mappings:accepted_sidenames the maker's bid. Buy YES sendsnoat 1 −no_bid. This was checked on the Kalshi demo exchange: an accept withnofilled as buy YES, 5 @ 0.45.acceptedSideis the requester's own side.engine.rfq):rfq_taker,rfq_quoter,worst_price). The intent is journaled before the venue call.cancelpolicy./trading/rfqs,/trading/quotes,/trading/combosand/trading/combos/collections.wait=trueand the quote is final.rfq.*,quote.*andcombo.savedevents on/ws/events.Tests
Not verified (phase P10, live, announced to Yuki before each run)
insufficient_balance.Each venue's checklist is in the doc.