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()
`
![image](https://user-images.githubusercontent.com/93001796/146934095-a8718364-c936-4c77-b70d-7403f7899700.png)
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
![image](https://user-images.githubusercontent.com/93001796/146944883-e11ff298-fca9-4562-8a9e-736f3d4e2093.png)
it works fine
Here is screenshot
Could you please assist me?
The text was updated successfully, but these errors were encountered: