From af2a9c7eeb607762035f2dff93706017191d42f8 Mon Sep 17 00:00:00 2001 From: Tarun Wadhwa Date: Tue, 6 Oct 2020 00:34:24 +0530 Subject: [PATCH] Fixed issue where fetch_order_status was throwing error 'Object of type Exchange is not JSON serializable' --- py5paisa/order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py5paisa/order.py b/py5paisa/order.py index 375d11d2..9ab0fd4c 100644 --- a/py5paisa/order.py +++ b/py5paisa/order.py @@ -104,8 +104,8 @@ def __repr__(self) -> dict: Overriding repr to return dict which can be directly appended to the orders list. """ return { - "Exch": self.exchange, - "ExchSegment": self.exchange_segment, + "Exch": self.exchange.value, + "ExchSegment": self.exchange_segment.value, "ScripCode": self.scrip_code, "RemoteOrderID": self.order_id }