feat(polymarket): track every live market over load-balanced lanes

An orchestrator keeps the tracked set equal to Gamma's live markets (a scan at
startup and every hour, new and closed markets every minute, reaching back 15
minutes for Gamma's indexing delay) and spreads them over lanes, each a
connection and a book thread, all writing through the one writer. Lanes report
each market's load in bytes per second; the orchestrator puts new markets on
the least-loaded lane and moves the busiest markets off lanes over a 300 KB/s
budget, busiest lane first. Differing books our own subscribe explains are
subscription gaps, not losses, and every first book after a move is logged,
so reconcile's mismatches are all accounted for in the log. A 75-minute live
run tracked ~195k markets (~390k symbols) in 89 lanes.
This commit is contained in:
pascal committed 2026-11-11 06:28:25 +00:00
1 parent adb7fee8d8
commit 8114a51dc2
18 files changed
+2826 -320

No files matched your search

+125
View File
@@ -0,0 +1,125 @@
{
"markets": [
{
"question": "XRP Up or Down - November 5, 11:50AM-11:55AM ET",
"conditionId": "0x7af9827676c3790cce6662e5a335d6f017ae99ecd9bd22b1d6f02bd4cf686f9b",
"clobTokenIds": "[\"115574995017995341868238121220540154732508720721227808951068953932623414227263\", \"42196855944990128389362302048239777171495224595711316446705919987418523770734\"]",
"orderMinSize": 5,
"negRisk": false,
"active": true,
"closed": false,
"enableOrderBook": true,
"acceptingOrders": true,
"createdAt": "2026-11-04T16:57:29.989119Z"
},
{
"question": "Exact Score: Any Other Score?",
"conditionId": "0xa19ecbe2c5ee9809b9902ddadf27c002171e91a4dc1eff5f3df515072ac63580",
"clobTokenIds": "[\"89984761009969090606365049502308215774844729861018229163736541869010668521883\", \"109098292314077657939935494027719386110066867173218583078610092308306402652377\"]",
"orderMinSize": 5,
"negRisk": true,
"active": true,
"closed": false,
"enableOrderBook": true,
"acceptingOrders": true,
"createdAt": "2026-11-04T16:54:27.166917Z"
},
{
"question": "Exact Score: South Shields 5 - 5 Southport FC?",
"conditionId": "0x526a2e209ecdc996126f7b0ce8aca970e238d00a5e8e1462583b319f161a81e2",
"clobTokenIds": "[\"23383971224876511286751474417288589641928550057174153221853770194514531463145\", \"102514263000521269570516172503620470436693609695432994526595167508530804022833\"]",
"orderMinSize": 5,
"negRisk": true,
"active": true,
"closed": false,
"enableOrderBook": true,
"acceptingOrders": true,
"createdAt": "2026-11-04T16:54:27.084521Z"
},
{
"question": "Exact Score: South Shields 5 - 4 Southport FC?",
"conditionId": "0xef7541f4318da1290833e7d4228eec646c8b8c3dc56c1e54f19aab5999b79eac",
"clobTokenIds": "[\"9590662984010730528349011455067967517680765388249930403038178415563136879677\", \"27306691953532238445589487371954210070154006783856682982476322761457890551225\"]",
"orderMinSize": 5,
"negRisk": true,
"active": true,
"closed": false,
"enableOrderBook": true,
"acceptingOrders": true,
"createdAt": "2026-11-04T16:54:27.011508Z"
},
{
"question": "Exact Score: South Shields 4 - 5 Southport FC?",
"conditionId": "0x650c95e95ded1b214ffd5ce3807ebbce5b53a5652e8d9bc4e5fc81a9b88e7e91",
"clobTokenIds": "[\"20427555995993676408608258992371178601145040240934408396949232679359337375578\", \"103063473308836065441608442719693527177410664791261885269576628238500009671761\"]",
"orderMinSize": 5,
"negRisk": true,
"active": true,
"closed": false,
"enableOrderBook": true,
"acceptingOrders": true,
"createdAt": "2026-11-04T16:54:26.943636Z"
},
{
"question": "Exact Score: South Shields 5 - 3 Southport FC?",
"conditionId": "0x6b8873a1138c840f212b1232decf41022d3c3d9152fc3630ac208ec373d223e4",
"clobTokenIds": "[\"113885867652625558735658932195210301609406698665198534717816428669601426385071\", \"111530920921450186157632707389308324089042969410875400892559036758646303736272\"]",
"orderMinSize": 5,
"negRisk": true,
"active": true,
"closed": false,
"enableOrderBook": true,
"acceptingOrders": true,
"createdAt": "2026-11-04T16:54:26.857401Z"
},
{
"question": "Exact Score: South Shields 4 - 4 Southport FC?",
"conditionId": "0xead8378060d14693e9b389460df33f4744f00624abebcac49f065fe4df71a8e1",
"clobTokenIds": "[\"74671658663122677156313407534212107516599429188436460342260016431503072138377\", \"98530071447174348550020247148894521999579673609192238144726023516722974096996\"]",
"orderMinSize": 5,
"negRisk": true,
"active": true,
"closed": false,
"enableOrderBook": true,
"acceptingOrders": true,
"createdAt": "2026-11-04T16:54:26.793546Z"
},
{
"question": "Exact Score: South Shields 3 - 5 Southport FC?",
"conditionId": "0x2b1ce687525f18ad61a59e36f23450d21f054f63f1e45f8ad1280599bcec5a9c",
"clobTokenIds": "[\"57945964795574745726585942326101714792053389461524739487276980421631849920286\", \"49065546046569817187747663996196121254480922109385243099359350773652868328963\"]",
"orderMinSize": 5,
"negRisk": true,
"active": true,
"closed": false,
"enableOrderBook": true,
"acceptingOrders": true,
"createdAt": "2026-11-04T16:54:26.720058Z"
},
{
"question": "Exact Score: South Shields 5 - 2 Southport FC?",
"conditionId": "0x73e7aad3c25b27f6ea5690533fbadda5232275bc3b2093be105bf2e8f0451f86",
"clobTokenIds": "[\"7212691718059316105797204867601393556290090412559254640981266981182975515579\", \"61803842573819523268874917567084084298265802112323835114562959941367399972826\"]",
"orderMinSize": 5,
"negRisk": true,
"active": true,
"closed": false,
"enableOrderBook": true,
"acceptingOrders": true,
"createdAt": "2026-11-04T16:54:26.635393Z"
},
{
"question": "Exact Score: South Shields 4 - 3 Southport FC?",
"conditionId": "0x39774e1c4ea209f84a503fd99093e2ba0857b1e4ac9850e7fc7aea843f9ab68f",
"clobTokenIds": "[\"95978542179162501111386271847728617693164545763728410170416353787697899447782\", \"82831019763051352453486760727930593092008868235043819951383814785887774411178\"]",
"orderMinSize": 5,
"negRisk": true,
"active": true,
"closed": false,
"enableOrderBook": true,
"acceptingOrders": true,
"createdAt": "2026-11-04T16:54:26.595371Z"
}
],
"next_cursor": "HD40wpBf4vc1G7nlWBWBeQio70FL4a-CS_Q9LExFBo17InYiOjEsImsiOiJtYXJrZXRzIiwib2giOiI5ZGExMThlZTZhMDViZmVkYTVjM2E1MzFjY2RhZWNkZTY0ZDlkYjQyZWQyMzQxZmE0NDcwNDBjOGViYWI1YzAxIiwia2V5cyI6W3sidCI6InRpbWUiLCJ2IjoiMjAyNi0xMS0wNFQxNjo1NDoyNi41OTUzNzFaIn0seyJ0Ijoic3RyaW5nIiwidiI6IjY2ODMyMTkifV19"
}