You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I am really happy to use your excellent library
Currently I am working on tdameritrade project.
I am facing one issue(403 error) when trying to get the orders
Here is my code to get orders
`
# first make sure that the token is still valid.
self.token_validation()
# grab the original headers we have stored.
merged_headers = self.headers()
# define the payload
data = {"accountId": account,
"maxResults": max_results,
"fromEnteredTime": from_entered_time,
"toEnteredTime": to_entered_time,
"status": status}
print(data)
print(merged_headers)
# define the endpoint
endpoint = '/orders'
# build the url
url = self.api_endpoint(endpoint)
# make the request
#return requests.get(url=url, headers=merged_headers, verify=True).json()
return requests.get(url=url, headers=merged_headers, params=data, verify=True).json()
`
and this is the log printed
but if change the request
from return requests.get(url=url, headers=merged_headers, params=data, verify=True).json()
to return requests.get(url=url, headers=merged_headers, verify=True).json()
then I got success(200 response)
I tried in postman with params
it works fine
Here is screenshot
Could you please assist me?
The text was updated successfully, but these errors were encountered:
First of all, I am really happy to use your excellent library
Currently I am working on tdameritrade project.
I am facing one issue(403 error) when trying to get the orders
Here is my code to get orders
`
# first make sure that the token is still valid.
self.token_validation()
`

and this is the log printed
but if change the request
from
return requests.get(url=url, headers=merged_headers, params=data, verify=True).json()
to
return requests.get(url=url, headers=merged_headers, verify=True).json()
then I got success(200 response)
I tried in postman with params

it works fine
Here is screenshot
Could you please assist me?
The text was updated successfully, but these errors were encountered: