Files
Kalshi_Polymarket/data/ibkr_contracts.example.json
Casey Judice dfdfe8414d IBKR daily scanner: correct YES+NO conid schema + discover helper
Earlier ibkr.py assumed each strike = one conid (buy=Yes / sell=No). The
IBKR ForecastEx CP API actually exposes each strike as TWO separate conids
(YES = right=CALL, NO = right=PUT). Local symbol shape is
CFBTC_MMDDYYHH_<strike>_<YES|NO> e.g. CFBTC_05242616_71000_YES means
4pm ET May 24 2026, $71,000 YES side.

- data/ibkr_contracts.example.json: per entry now has yes_conid + no_conid
  + strike + close_iso + label (one row per strike).
- arb/daily.py: snapshots both conids in one batch; yes_ask/no_ask come
  directly from each side's ask (no more 1-bid derivation).
- scripts/discover_ibkr.py: walks /iserver/secdef/strikes + secdef/info to
  print the full YES/NO ladder for a given underlying + month + maturity.
  Filters by maturityDate so it doesn't mix expiries.

End-to-end verified: 3 sample strikes pair cleanly to KXBTCD-26MAY2416
(IBKR $71K -> Kalshi T70999.99 etc.). Live prices still pending the
user's ForecastEx market-data subscription / strikes closer to spot.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 10:19:26 -04:00

30 lines
1.3 KiB
JSON

{
"_comment": "Copy to data/ibkr_contracts.json and fill in your own IBKR ForecastEx conids. data/ibkr_contracts.json is git-ignored. IBKR uses TWO conids per strike — one for YES (right=CALL, the 'or above' side) and one for NO (right=PUT). Find them via the included scripts/discover_ibkr.py once your Gateway is auth'd (it walks /iserver/secdef/strikes + /iserver/secdef/info for a given underlying conid + month and prints YES/NO pairs). `close_iso` is the UTC timestamp the contract settles at (e.g. 4pm ET = 20:00:00Z during EDT). The scanner pairs each entry to the Kalshi KXBTCD market closing at the same instant with nearest strike.",
"contracts": [
{
"asset": "BTC",
"strike": 71000,
"yes_conid": 886364930,
"no_conid": 886364935,
"close_iso": "2026-05-24T20:00:00Z",
"label": "BTC > $71,000 @ 4pm ET, 5/24"
},
{
"asset": "BTC",
"strike": 71500,
"yes_conid": 886364936,
"no_conid": 886364941,
"close_iso": "2026-05-24T20:00:00Z",
"label": "BTC > $71,500 @ 4pm ET, 5/24"
},
{
"asset": "BTC",
"strike": 72000,
"yes_conid": 886364947,
"no_conid": 886364950,
"close_iso": "2026-05-24T20:00:00Z",
"label": "BTC > $72,000 @ 4pm ET, 5/24"
}
]
}