Skip to content

core/docs/ERRORS.md and SETUP_KALSHI.md TypeScript samples import from a nonexistent 'pmxt' package #2313

Description

@realfishsam

Gap

Every TypeScript code sample in core/docs/ERRORS.md (14 import statements across the file) imports from 'pmxt'. No npm package named pmxt exists anywhere in this monorepo — the published TypeScript SDK is pmxtjs and the core engine package is pmxt-core. Any user copy-pasting these samples gets a module-not-found error before the example runs. core/docs/SETUP_KALSHI.md's TypeScript section compounds this: it imports KalshiExchange/KalshiDemoExchange from 'pmxt', but the SDK exports plain Kalshi/KalshiDemo (no Exchange suffix), and wraps credentials in a nonexistent { credentials: { apiKey, privateKey } } shape — the real ExchangeOptions type is flat ({ apiKey, privateKey } directly). This is distinct from the already-filed #2209 (SETUP_KALSHI.md's RSA-file-path claim) and #2206/#2207 (ERRORS.md content gaps around NotSupported and the errorMsg field) — none of those address the import/class-name/constructor-shape breakage.

Core

N/A — this is a documentation defect, not a core capability gap. Correct reference: core/package.json names the core package "pmxt-core".

TypeScript SDK

  • sdks/typescript/package.json names the SDK package "pmxtjs".
  • sdks/typescript/pmxt/client.ts:3340 — export class Kalshi extends Exchange { constructor(options: ExchangeOptions = {}) { ... } } (and KalshiDemo at line 3453) — no KalshiExchange/KalshiDemoExchange export exists.
  • sdks/typescript/pmxt/client.ts:233 — ExchangeOptions is a flat interface (apiKey?, apiSecret?, privateKey?, ...); there is no credentials sub-object.
  • By contrast, sdks/typescript/examples/**/*.ts correctly import { Polymarket } from 'pmxtjs', and docs/api-reference/errors.mdx correctly uses 'pmxtjs' — confirming this is isolated to these two core/docs/*.md files.

Python SDK

N/A — this defect is TypeScript-sample-specific.

Evidence

grep -rn "from 'pmxt'" across docs/, core/docs/, and llms*.txt returns matches only in ERRORS.md (lines 24,33,42,51,67,80,89,98,109,118,166,193,294,313) and SETUP_KALSHI.md (lines 94, 121). Verified against package.json names and actual class/type exports in client.ts. Cross-checked against the 273-issue backlog and a targeted GitHub search for "core/docs import from pmxt package does not exist" — no matching issue found.

Impact

A developer following either doc's TypeScript instructions cannot get past the first line — pmxt isn't installable under that name, and even guessing pmxtjs still fails on the wrong export name (KalshiExchange) and the wrong constructor shape (nested credentials).


Found by automated Core-to-SDK surface coverage audit

Activity

  1. mikevillari commented on Sep 9, 2026

    @mikevillari

    I'd like to take this docs fix. The error guide describes core BaseError/NotFound/status, which pmxtjs does not export, so I'll point that guide at pmxt-core and clarify the SDK distinction. The Kalshi TypeScript setup will use pmxtjs, Kalshi/KalshiDemo, and flat options. I'll validate against actual exports/types without making exchange requests. AI-assisted work.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions