From f409e6416bf5bed6eb3770a398222f305ee66017 Mon Sep 17 00:00:00 2001 From: 9CAT <9cat@users.noreply.github.com> Date: Wed, 9 Mar 2022 12:02:14 -0800 Subject: [PATCH] TypeError: 'Response' object is not subscriptable Request account_response should be account_response.data instead --- examples/orders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/orders.py b/examples/orders.py index bcff702..97a4552 100644 --- a/examples/orders.py +++ b/examples/orders.py @@ -33,7 +33,7 @@ # Get our position ID. account_response = client.private.get_account() -position_id = account_response['account']['positionId'] +position_id = account_response.data['account']['positionId'] # Post an bid at a price that is unlikely to match. order_params = {