Skip to content

watchOrderBook docs omit limit parameter that the code accepts #163

@realfishsam

Description

@realfishsam

Inconsistency

The PMXT documentation for watchOrderBook does not mention the limit parameter in its parameter table, but the TypeScript core implementation accepts limit?: number as a second argument.

Current (PMXT)

TypeScript core — core/src/BaseExchange.ts:

async watchOrderBook(outcomeId: string, limit?: number): Promise<OrderBook>

Documentation (docs/llms-full.txt) — parameter table for watchOrderBook:

| outcomeId | string | The outcome token ID |
# limit is not listed

Expected (CCXT convention)

/tmp/ccxt/ts/src/base/Exchange.ts:

async watchOrderBook(symbol: string, limit: Int = undefined, params = {}): Promise<OrderBook>

CCXT documents limit as a standard parameter for controlling the depth of the streamed order book. PMXT's docs should document the limit parameter, and the method should also accept params = {}.

Impact

Callers reading the documentation will not know that limit is available for controlling book depth. Any CCXT-compatible code passing watchOrderBook(symbol, limit) will work by accident (since the positional arg aligns), but callers passing watchOrderBook(symbol, limit, params) will have params silently ignored.

Found by automated PMXT ↔ CCXT API consistency audit

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3: lowapi-consistencyCCXT/PMXT API consistency audit findingsbugSomething isn't workingcoreCore sidecar/server logicdocumentationImprovements or additions to documentationeffort: smallgood first issueGood for newcomers

    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