Skip to content

fix(python-sdk): use order_type kwarg in trading examples - #2383

Open
t957095 wants to merge 1 commit into
pmxt-dev:mainfrom
t957095:fix/python-sdk-examples-order-type
Open

t957095 wants to merge 1 commit into
pmxt-dev:mainfrom
t957095:fix/python-sdk-examples-order-type

Conversation

@t957095

@t957095 t957095 commented Sep 18, 2026

Copy link
Copy Markdown

Problem

Both shipped Python SDK trading examples call create_order(type=...), but Exchange.create_order() declares the parameter as keyword-only order_type (no **kwargs). Running either example raises TypeError: create_order() got an unexpected keyword argument 'type'.

Fix

Replace type= with order_type= in place_limit_order.py and place_market_order.py (including the commented Option-2 block).

Fixes #2382

Exchange.create_order() declares the order-type parameter as the
keyword-only 'order_type', but both bundled trading examples passed
'type=', raising TypeError before any order is placed.

Fixes pmxt-dev#2382

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python SDK trading examples call create_order(type=...) but the SDK requires order_type= — both examples raise TypeError

1 participant