createOrder: object params instead of CCXT positional (symbol, type, side, amount, price, params)
Inconsistency
createOrder takes a single CreateOrderParams object instead of CCXT's six positional arguments (symbol, type, side, amount, price, params).
Current (PMXT)
core/src/BaseExchange.ts:
async createOrder(params: CreateOrderParams): Promise<Order>
// CreateOrderParams is an object containing outcomeId, side, type, amount, price, etc.
sdks/python/pmxt/client.py — similarly uses a dict/object-based approach.
Expected (CCXT convention)
/tmp/ccxt/ts/src/base/Exchange.ts:
async createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price: Num = undefined, params = {}): Promise<Order>
- Six positional args:
symbol,type,side,amount,price,params pricedefaults toundefinedfor market orders- Trailing
params = {}for exchange-specific options (e.g.timeInForce,postOnly)
Impact
This is the single most-called method in any trading library. No CCXT-compatible bot or strategy can call createOrder on a PMXT exchange instance without complete rewriting. The positional signature is intentional in CCXT to enforce a minimal canonical order representation.
Found by automated PMXT ↔ CCXT API consistency audit
Additional context from duplicate #504 — SDK-level file locations and extended scope:
- TypeScript
createOrder:sdks/typescript/pmxt/client.tsline 1969 —async createOrder(params: any)(fully untyped) - TypeScript
buildOrder:sdks/typescript/pmxt/client.tsline 1824 —async buildOrder(params: CreateOrderParams & { outcome?: MarketOutcome }) - Python
create_order:sdks/python/pmxt/client.pyline 2324 — uses explicit keyword args (market_id,outcome_id,side,type,amount,price, etc.)
Note: buildOrder/build_order has the same calling-convention problem as createOrder/create_order and should be fixed together.
Generated by Claude Code