fix(core): batch Polymarket position condition_ids gamma lookup#981
fix(core): batch Polymarket position condition_ids gamma lookup#981atomzakk wants to merge 1 commit into
Conversation
Chunk Gamma /markets enrichment in fetchPositions so wallets with 50+ historical positions no longer hit Cloudflare 403 HTML
PR Review: VERIFIEDWhat This DoesThis changes Polymarket Blast RadiusPolymarket core only: Consumer VerificationBefore (base branch): node /opt/data/cron/tmp/pmxt-pr-review/verify-polymarket-batch.jsResponse snippet: {"ok":false,"requestBatchSizes":[81],"error":"Request failed with status code 403","status":403}After (PR branch): {"ok":true,"requestBatchSizes":[40,40,1],"count":81,"resolved":81,"sample":[{"conditionId":"cond-0","size":"1","avgPrice":"0.5","resolvedMarketId":"market-0"},{"conditionId":"cond-1","size":"1","avgPrice":"0.5","resolvedMarketId":"market-1"}]}Test Results
FindingsNo blocking findings. PMXT Pipeline Check
Semver Impactpatch -- bug fix for Polymarket position enrichment reliability. RiskThe batch size is a fixed conservative constant (40) based on observed Cloudflare behavior; if Gamma later lowers its query-size threshold this could need another adjustment. Requests are sequential rather than parallel, so very large historical wallets may incur extra latency, but correctness improves and the affected path is private position enrichment. |
Chunk Gamma /markets enrichment in fetchPositions so wallets with 50+ historical positions no longer hit Cloudflare 403 HTML