Closed SunnyRaj closed 3 years ago
Description of Bug
get_hours_for_single_market always returns an error
get_hours_for_single_market
Code to Reproduce
response = client.get_hours_for_single_market(client.Markets.EQUITY, datetime.datetime.today()) print(json.dumps(response.json()))
Expected Behavior
{ "equity": { "EQ": { "date": "2021-02-11", "marketType": "EQUITY", "exchange": "NULL", "category": "NULL", "product": "EQ", "productName": "equity", "isOpen": true, "sessionHours": { "preMarket": [ { "start": "2021-02-11T07:00:00-05:00", "end": "2021-02-11T09:30:00-05:00" } ], "regularMarket": [ { "start": "2021-02-11T09:30:00-05:00", "end": "2021-02-11T16:00:00-05:00" } ], "postMarket": [ { "start": "2021-02-11T16:00:00-05:00", "end": "2021-02-11T20:00:00-05:00" } ] } } } }
Actual Behavior
{ "timestamp": "2021-02-11", "status": 400, "error": "Bad Request", "message": "Input date is not acceptable.", "path": "/markethours-v1/markets/EQUITY" }
This seems to be working now. The error is most likely a timing issue on the server.
Description of Bug
get_hours_for_single_market
always returns an errorCode to Reproduce
Expected Behavior
Actual Behavior