From c25483f728d41acfbecd3c432d6625e960c3778e Mon Sep 17 00:00:00 2001 From: t957095 Date: Fri, 18 Sep 2026 17:00:37 -0500 Subject: [PATCH] fix(python-sdk): use order_type kwarg in trading examples 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/pmxt#2382 --- sdks/python/examples/trading/place_limit_order.py | 4 ++-- sdks/python/examples/trading/place_market_order.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdks/python/examples/trading/place_limit_order.py b/sdks/python/examples/trading/place_limit_order.py index ea40fdb4..f516f1ce 100644 --- a/sdks/python/examples/trading/place_limit_order.py +++ b/sdks/python/examples/trading/place_limit_order.py @@ -13,7 +13,7 @@ def main(): order = client.create_order( outcome=market.yes, side='buy', - type='limit', + order_type='limit', amount=10, price=0.10 ) @@ -24,7 +24,7 @@ def main(): # market_id='663583', # outcome_id='10991849228756847439673778874175365458450913336396982752046655649803657501964', # side='buy', - # type='limit', + # order_type='limit', # amount=10, # price=0.10 # ) diff --git a/sdks/python/examples/trading/place_market_order.py b/sdks/python/examples/trading/place_market_order.py index 6833099e..ec778615 100644 --- a/sdks/python/examples/trading/place_market_order.py +++ b/sdks/python/examples/trading/place_market_order.py @@ -11,7 +11,7 @@ def main(): market_id='663583', outcome_id='10991849228756847439673778874175365458450913336396982752046655649803657501964', side='buy', - type='market', + order_type='market', amount=10 ) print(order)