Skip to content

fix: align exchange normalizers with live payloads#873

Merged
realfishsam merged 8 commits into
mainfrom
fix/issue-795-799-response-drift
Jun 8, 2026
Merged

fix: align exchange normalizers with live payloads#873
realfishsam merged 8 commits into
mainfrom
fix/issue-795-799-response-drift

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Summary

  • Gemini Titan: extract rich-text descriptions, prefer directional buy/sell prices, and fall back to liquidity proxies from volume fields.
  • Hyperliquid: preserve l2Book level order counts.
  • Kalshi: surface yes_ask_size_fp / yes_bid_size_fp in source metadata.
  • Limitless: prefer tradePrices directional pricing over the legacy prices array.

Tests

  • npm test --workspace=pmxt-core -- --runInBand test/normalizers/exchange-normalizers.test.ts test/normalizers/exchange-normalizers-3.test.ts test/normalizers/gemini-titan-normalizer.test.ts

Fixes #795
Fixes #796
Fixes #797
Fixes #798
Fixes #799

@mintlify

mintlify Bot commented Jun 5, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
PMXT 🟢 Ready View Preview Jun 5, 2026, 2:30 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@realfishsam

Copy link
Copy Markdown
Contributor Author

PR Review: FAIL

What This Does

Aligns multiple exchange normalizers with live payload drift and updates API/docs artifacts. This matters because missing fields in normalizer/OpenAPI/SDK layers can be silently dropped.

Blast Radius

Gemini Titan, Hyperliquid, Kalshi, Limitless normalizers/fetchers, core/src/types.ts, OpenAPI/docs.
Changed files reviewed: core/src/exchanges/gemini-titan/normalizer.ts, core/src/exchanges/hyperliquid/normalizer.ts, core/src/exchanges/kalshi/fetcher.ts, core/src/exchanges/kalshi/normalizer.ts, core/src/exchanges/limitless/fetcher.ts, core/src/exchanges/limitless/utils.ts, core/src/server/openapi.yaml, core/src/types.ts, core/test/normalizers/exchange-normalizers-3.test.ts, core/test/normalizers/exchange-normalizers.test.ts, core/test/normalizers/gemini-titan-normalizer.test.ts, docs/api-reference/fetch-order-book.mdx, docs/llms-full.txt

Consumer Verification

Before (base branch):
Base branch (origin/main) does not include these changes. I reviewed the diff against the base and did not run full live-exchange before/after reproduction in this daily batch.

After (PR branch):
PR branch build PASS; authenticated local sidecar smoke PASS using POST /api/mock/fetchMarkets with x-pmxt-access-token, response snippet: {"success":true,"data":[{"marketId":"mock-m0","eventId":"mock-event-0","title":"Which party wins the 2026 harborland election?","description":"incididunt magna metus ut cupidatat aliquip dolore quis incididunt id do aenean aenean non dolor dolore tempor pharetra lorem fugiat aenean est voluptate ...

Test Results

  • Build: PASS (npm run build --workspace=pmxt-core)
  • Unit tests: PASS (npm test --workspace=pmxt-core -- --runInBand)
  • Server starts: PASS
  • E2E smoke: PASS (POST /api/mock/fetchMarkets; live venue-specific calls were not made)
  • Dependency install: skipped (existing workspace deps reused)

Findings

  1. Added floating-point conversion in a price/amount-sized path; verify it cannot truncate venue financial strings.

PMXT Pipeline Check

  • Field propagation (3-layer): OK
  • OpenAPI sync: OK
  • Financial precision: ISSUE
  • Type safety: ISSUE
  • Auth safety: N/A

Semver Impact

minor -- bug fix/internal compatibility change unless SDK consumers rely on newly added APIs

Risk

The branch was built, core-tested, and authenticated-smoke-tested through the sidecar. Full live-exchange before/after behavior remains unverified for this daily batch; credentialed venue calls and venue API drift should be treated as residual risk unless covered by tests in this PR.

@realfishsam realfishsam merged commit d8ff7f1 into main Jun 8, 2026
15 checks passed
realfishsam added a commit that referenced this pull request Jun 8, 2026
Covers everything between 2.48.6 and HEAD plus the hosted-trading-mode
work on this branch — Added (7 bullets: hosted trading mode end-to-end,
Escrow namespace, hosted error hierarchy, 2 e2e drivers, 87 new
dispatch + error-mapping tests, feed listing surface), Changed (9
bullets: SDK 2.18.0 version bumps, new model fields, drift parity
sweep, dep refreshes), Fixed (12 bullets covering both the
hosted-mode bugs caught by the live $5 buy + sell and the unrelated
fixes that landed on main since 2.48.6 — #871 #870 #873 #874 #875 #876
#877 #879 #663 #872 + the three this branch adds), Docs (2 bullets).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment