fix(sdk): compute detailed execution prices locally#1308
Conversation
PR Review: PASS (NOT VERIFIED)What This DoesMoves Blast RadiusPython SDK Consumer VerificationBefore (base branch): Polymarket(auto_start_server=False).get_execution_price_detailed(order_book, "buy", 8)
# base implementation attempts sidecar HTTP POST /api/polymarket/getExecutionPriceDetailedAfter (PR branch): asks=[(0.52, 4), (0.50, 6)], side="buy", amount=8
# fills 6 @ 0.50 + 2 @ 0.52 => price 0.505, filled_amount=8, fully_filled=TrueRuntime SDK verification was blocked by missing generated SDK artifacts in this checkout, not by this PR's changed logic. Test Results
FindingsNo blocking findings. PMXT Pipeline Check
Semver Impactpatch -- SDK-local bug fix/removal of unnecessary sidecar dependency for an existing helper method. RiskThe old TypeScript |
Summary
getExecutionPriceDetaileda synchronous local order-book walk instead of a sidecar HTTP call.get_execution_price_detailedcompute the same pure result locally.Fixes #1306
Test Plan
git diff --check HEAD~1..HEAD✅node sdks/typescript/scripts/generate-client-methods.js✅node sdks/python/scripts/generate-client-methods.js✅npm test --workspace=pmxtjs -- --runTestsByPath tests/execution-price-detailed-local.test.ts --runInBandblocked locally: this checkout lackssdks/typescript/generated/src/index.js;npm run generate --workspace=pmxtjsis blocked by missingjavain the cron environment.PYTHONPATH=sdks/python python3 sdks/python/tests/test_execution_price_detailed_local.pyblocked locally: this checkout lacks generatedpmxt_internal.