tradestation-python-api icon indicating copy to clipboard operation
tradestation-python-api copied to clipboard

Added header to user_accounts request

Open qtmspin opened this issue 5 years ago • 2 comments

Line 640 # grab the response. response = self._handle_requests( url=url_endpoint, method='get', args=params )

    return response

Changed to: headers = self.headers()

    # grab the response.
    response = self._handle_requests(
        url=url_endpoint,
        method='get',
        headers=headers,
        args=params
    )

qtmspin avatar Nov 17 '20 20:11 qtmspin

Thanks for this fix. Not only line 640, three or four more places needed the same change. I added two lines headers = self.headers() and headers=headers to make it run without debud errors.

MonkeymanCoder avatar Jan 29 '21 03:01 MonkeymanCoder

Hello @MonkeymanCoder and @qtmspin

Thanks for tips, but it is not clear for me where did you add the headers = self.headers() Could you please expand specify. Thanks a lot!

Also, I noted a lot of places following the same structure... should we put the same headers=headers line everywhere?

Thanks!

svh02 avatar Apr 16 '21 23:04 svh02