I am using a simple code snippet which was working fine for last 4 months. I have suddenly started getting error on this.
Code:
url = “https://api.nyse.com/api/market-events/?type=dividend”
payload = {}
headers = {
‘Content-Type’: ‘application/json’,
‘x-api-key’: ‘XXXXX’
}
Params = {
‘type’:‘dividend’,
‘page_size’:‘500000’,
‘published_after’: ‘2020-10-01T10:00:00.000’,
‘effective_date_before’: ‘2020-10-20T10:00:00.000’
}
response = requests.request(“GET”, url, headers=headers, params=Params, data = payload)
x = response.text
import json
y = json.loads(x)
Can anyone help me with this?