Inconsistency
getExecutionPrice is defined as a synchronous method in BaseExchange (it operates only on the provided OrderBook object, making no I/O calls), but the TypeScript SDK wraps it as async, returning a Promise<number>. Callers cannot treat the two implementations uniformly.
Current (PMXT)
Core — core/src/BaseExchange.ts line ~970:
getExecutionPrice(orderBook: OrderBook, side: 'buy' | 'sell', amount: number): number
// ← synchronous, returns number directly
TypeScript SDK — sdks/typescript/pmxt/client.ts line ~2018:
async getExecutionPrice(orderBook: OrderBook, side: 'buy' | 'sell', amount: number): Promise<number>
// ← async, returns Promise<number>
Expected (CCXT convention)
CCXT does not have an getExecutionPrice equivalent, but the CCXT convention is that pure calculation helpers are synchronous. Since getExecutionPrice takes an already-fetched OrderBook as input and performs only arithmetic, there is no reason for it to be async. The SDK should match the core and return number directly.
Impact
Code written against the core that uses const price = exchange.getExecutionPrice(book, 'buy', 10) will break when run against the SDK client, which requires await. The unnecessary Promise wrapping adds overhead and forces callers to use await for a pure computation.
Found by automated PMXT ↔ CCXT API consistency audit
Inconsistency
getExecutionPriceis defined as a synchronous method inBaseExchange(it operates only on the providedOrderBookobject, making no I/O calls), but the TypeScript SDK wraps it asasync, returning aPromise<number>. Callers cannot treat the two implementations uniformly.Current (PMXT)
Core —
core/src/BaseExchange.tsline ~970:TypeScript SDK —
sdks/typescript/pmxt/client.tsline ~2018:Expected (CCXT convention)
CCXT does not have an
getExecutionPriceequivalent, but the CCXT convention is that pure calculation helpers are synchronous. SincegetExecutionPricetakes an already-fetchedOrderBookas input and performs only arithmetic, there is no reason for it to beasync. The SDK should match the core and returnnumberdirectly.Impact
Code written against the core that uses
const price = exchange.getExecutionPrice(book, 'buy', 10)will break when run against the SDK client, which requiresawait. The unnecessaryPromisewrapping adds overhead and forces callers to useawaitfor a pure computation.Found by automated PMXT ↔ CCXT API consistency audit