get_history request failed

Moderator: Moderator

get_history request failed

Postby donggua1 » Wed Nov 23, 2022 11:34 pm

Hello,
When i running the get_history function, it's receiving the HTTP request failed error as shown below:
Exception: QuotesManager error: HTTP request failed object='/pricearchive/catalog.xml' errorCode=400 code: QuotesServerConnectionError subcode: 400
I'm a bit confuse with that, is there any mistake i have made in code?
with ForexConnect() as fx:
try:
fx.login(str_user_id, str_password, "fxcorporate.com/Hosts.jsp",
"Demo", session_status_callback=session_status_changed)
start_date = dt.datetime.strptime("11.22.2022 00:00:00", '%m.%d.%Y %H:%M:%S')#.replace(tzinfo=dt.timezone.utc)
end_date = dt.datetime.strptime("11.23.2022 00:00:00", '%m.%d.%Y %H:%M:%S')
print(start_date)
print(end_date)
history = fx.get_history("AUD/USD", "m15", date_from = start_date, date_to = end_date)

except Exception as e:
print("Exception: " + str(e))
Thanks a lot for the patient help.
donggua1
 
Posts: 2
Joined: Wed Nov 23, 2022 11:11 pm

Return to ForexConnect API

Who is online

Users browsing this forum: No registered users and 5 guests