Skip to content

docs: clarify historical fetch order book usage#837

Merged
realfishsam merged 7 commits into
mainfrom
docs/fetch-order-book-historical-clarity
Jun 8, 2026
Merged

docs: clarify historical fetch order book usage#837
realfishsam merged 7 commits into
mainfrom
docs/fetch-order-book-historical-clarity

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Summary

  • Clarify that Polymarket fetch_order_book(token_id) without historical params uses the live CLOB only and can fail for closed/resolved markets.
  • Document archive-backed historical snapshot/range behavior and distinguish it from live order book calls.
  • Use fetch_event(slug=...) with nested markets for crypto 5m event slugs.
  • Fix curl Authorization header quote syntax and note raw bulk Parquet access via PMXT Archive.

Closes #836

Test plan

  • Inspected package.json docs scripts; no dedicated docs/MDX validation script was present.
  • Ran a Node sanity check for balanced MDX code fences and component tags, plus curl Authorization header syntax.
  • Ran git diff --check.

@mintlify

mintlify Bot commented Jun 2, 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 2, 2026, 11:39 AM

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

@realfishsam

Copy link
Copy Markdown
Contributor Author

PR Review: FAIL

What This Does

Updates docs/OpenAPI documentation around hosted/custom endpoints and historical fetch-order-book usage. Runtime SDK behavior should be unchanged.

Blast Radius

Documentation/OpenAPI docs artifacts only.
Changed files reviewed: core/src/server/openapi.yaml, docs/api-reference/fetch-order-book.mdx, docs/api-reference/openapi.json, docs/concepts/venues.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 FAIL; authenticated local sidecar smoke FAIL using POST /api/mock/fetchMarkets with x-pmxt-access-token, response snippet: skipped because build failed

Test Results

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

Findings

  1. Build failed: src/exchanges/limitless/websocket.ts(276,39): error TS2345: Argument of type '"orderbook"' is not assignable to parameter of type 'SubscriptionChannel'.
    src/exchanges/limitless/websocket.ts(279,39): error TS2345: Argument of type '"prices"' is not assignable to parameter of type 'SubscriptionChannel'.
    ../node_modules/ox/tempo/KeyAuthorization.ts(537,3): error TS2322: Type '{ account?: 0x${string} | undefined; isAdmin?: true | undefined; witness?: 0x${string} | undefined; signature: SignatureEnvelope.SignatureEnvelope<bigint, number>; ... 5 more ...; chainId: bigint; }' is not assignable to type 'Signed<bigint, number, 0x${string}>'.
    Type '{ account?: 0x${string} | undefined; isA...
  2. Core Jest tests failed: at Object. (test/normalizers/exchange-normalizers-3.test.ts:19:1)

Test Suites: 7 failed, 15 passed, 22 total
Tests: 446 passed, 446 total
Snapshots: 0 total
Time: 12.053 s
Ran all test suites.
npm ERR! Lifecycle script test failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: pmxt-core@2.17.1
npm ERR! at location: /opt/data/repos/pmxt/core
3. Server/API smoke failed: skipped because build failed

PMXT Pipeline Check

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

Semver Impact

patch -- docs/metadata-only change

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 27b93c5 into main Jun 8, 2026
11 checks passed
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.

Docs: clarify live vs historical fetchOrderBook for Polymarket archives

1 participant