秋田预测市场 · Discord 审计

ws订单簿更新中No Shares深度显示错误

2026-06-15 · Limitless · 2 条相关讨论

First Aligner 2026-06-15 02:56:03

The ws orderbookUpdate shows a wrong depth of the no/down shares (it mirrors the size of the yes shares) & the only way to get the real depth of the no shares is to poll rest endpoint GET/markets/slug/orderbook and to compute it which will result in rate limit (too many requests) any solution for this? Shouldn’t limitless show the real depth of the no instead of a fake one ?

The ws orderbookUpdate shows a wrong depth of the no/down shares (it mirrors the size of the yes shares) & the only way to get the real depth of the no shares is to poll rest endpoint GET/markets/slug/orderbook and to compute it which will result in rate limit (too many requests) any solution for this? Shouldn’t limitless show the real depth of the no instead of a fake one ?

Jeremy | Limitless 2026-06-15 05:33:01

It's not a bug, and you don't need REST at all. A binary Limitless market is a single order book keyed to the Yes/Up token (positionIds[0] = Yes, [1] = No) — both REST and the orderbookUpdate stream carry that same one ladder. The NO side mirrors the size because of the merge/split identity: 1 Yes + 1 No = $1, so a buy-Yes at p is the same liquidity as a sell-No at 1 − p. The contracts are shared, so size is genuinely identical — only the price flips to 1 − p. That's the real NO depth, not a fake one. So just derive NO from the Yes book you're already receiving — no polling, no 429s: `// from each orderbookUpdate (the Yes book) const noAsks = data.bids.map(b => ({ price: 1 - b.price, size: b.size })); // BUY No const noBids = data.asks.map(a => ({ price: 1 - a.price, size: a.size })); // SELL No // best No ask = 1 − best Yes bid; best No bid = 1 − best Yes ask` If your NO depth looks wrong, the likely culprit is copying the size (correct) without flipping the price to 1 − p. Fetch REST once on subscribe to seed state, then maintain everything from the WS stream.

It's not a bug, and you don't need REST at all. A binary Limitless market is a single order book keyed to the Yes/Up token (positionIds[0] = Yes, [1] = No) — both REST and the orderbookUpdate stream carry that same one ladder. The NO side mirrors the size because of the merge/split identity: 1 Yes + 1 No = $1, so a buy-Yes at p is the same liquidity as a sell-No at 1 − p. The contracts are shared, so size is genuinely identical — only the price flips to 1 − p. That's the real NO depth, not a fake one. So just derive NO from the Yes book you're already receiving — no polling, no 429s: `// from each orderbookUpdate (the Yes book) const noAsks = data.bids.map(b => ({ price: 1 - b.price, size: b.size })); // BUY No const noBids = data.asks.map(a => ({ price: 1 - a.price, size: a.size })); // SELL No // best No ask = 1 − best Yes bid; best No bid = 1 − best Yes ask` If your NO depth looks wrong, the likely culprit is copying the size (correct) without flipping the price to 1 − p. Fetch REST once on subscribe to seed state, then maintain everything from the WS stream.