Skip to content

Fix JSON-encoded Polymarket US outcome prices - #2627

Open
jay23606 wants to merge 1 commit into
pmxt-dev:mainfrom
jay23606:pr-go/2616-response-drift-polymarket-us-outcomepric
Open

jay23606 wants to merge 1 commit into
pmxt-dev:mainfrom
jay23606:pr-go/2616-response-drift-polymarket-us-outcomepric

Conversation

@jay23606

Copy link
Copy Markdown

Bug

Polymarket US can return outcomePrices as a JSON-encoded string. The normalizer indexed that string as though it were an array, producing zero fallback prices.

Change

Parse string values as JSON arrays before reading the long and short prices, while retaining support for array values. Added a regression test for the live gateway response shape.

Checks

  • npm test --workspace=pmxt-core -- --runInBand test/normalizers/exchange-normalizers-3.test.ts
  • git diff --check

Regression test: fails on base twice (/Expected: 0.97\s+Received: 0/), passes on fix (npm test --workspace=pmxt-core -- --runInBand test/normalizers/exchange-normalizers-3.test.ts)

Fixes #2616

@jay23606

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Response drift: polymarket_us — outcomePrices is JSON-encoded string in live API; normalizer indexes it as string[]

1 participant