Skip to content

Polymarket.initAuth() is in core and documented in both SDK API references but missing from both SDK source files #505

@realfishsam

Description

@realfishsam

Gap

PolymarketExchange exposes initAuth(), a public method that initializes L2 API credentials for implicit-API signing. Both SDK API_REFERENCE.md files document this method as part of the Polymarket public surface, but neither SDK's source code actually implements it. This is a documentation-vs-implementation gap as well as a core-to-SDK gap.

Core

File: core/src/exchanges/polymarket/index.ts line 142

async initAuth(): Promise<void>

Initializes L2 API key credentials for implicit API signing (required before using private Polymarket implicit-API endpoints). The method is referenced again at line 570 inside the exchange, where it tells callers to invoke it explicitly if credentials are not yet present.

TypeScript SDK

Missing — sdks/typescript/pmxt/client.ts has no initAuth method on the Exchange base class or the Polymarket subclass (defined at line 2419, constructor-only). Searching the entire sdks/typescript/ tree for initAuth returns zero results in source files.

The method is documented in sdks/typescript/API_REFERENCE.md lines 1260–1282:

async initAuth(): Promise<void>

This makes the gap visible to any developer who reads the reference docs and then searches for the method in the SDK.

Python SDK

Missing — sdks/python/pmxt/client.py has no init_auth method on the Exchange base class. The Polymarket subclass in sdks/python/pmxt/_exchanges.py is a constructor-only wrapper with no additional methods. Searching the entire sdks/python/ tree for init_auth returns zero results in source files.

The method is documented in sdks/python/API_REFERENCE.md lines 1257–1279:

def init_auth() -> void

Evidence

grep -rn "initAuth" sdks/typescript/pmxt/ returns zero results.
grep -rn "init_auth" sdks/python/pmxt/ returns zero results.
grep -n "initAuth" core/src/exchanges/polymarket/index.ts returns lines 142 and 570.
Both sdks/typescript/API_REFERENCE.md (line 1260) and sdks/python/API_REFERENCE.md (line 1257) document this method, creating a misleading discoverability situation where docs advertise a method the code does not expose.

Impact

TypeScript and Python SDK users who need to authenticate Polymarket's implicit API (required for certain private trading endpoints) cannot call initAuth() through the SDK. The reference docs tell them the method exists, leading to a confusing "method not found" experience. They must fall back to raw callApi('initAuth') with no type safety, or use the core library directly. Polymarket is one of the highest-volume exchanges in the system, making auth initialization a critical path.


Found by automated Core-to-SDK surface coverage audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions