-1

I am using the npm intraday package, and i recently noticed that whenever I call the intraday() function i get a 301 error as a response. Is anyone else having this issue?

R. Sy
  • 1

2 Answers2

0

I currently receive status 200 using the API with the request:

https://chartapi.finance.yahoo.com/instrument/1.0/NFLX/chartdata;type=quote;range=1d/csv

You can check the GitHub source for the Intraday module and test the API using either your browser or an application such as Postman.

If you're still having problems, check your local network for possible redirections.

Matt Shirley
  • 4,216
  • 1
  • 15
  • 19
0

HTTP 301 isn't an error; it's a redirect.

It looks like the yahoo API is issuing now redirects from plain http to https. Unfortunately, the module you're using makes a plain http request and does not handle HTTP redirects.

Given that this is a simple request, I recommend using a more fully-featured HTTP client like request instead of the specialized intraday module.

josh3736
  • 139,160
  • 33
  • 216
  • 263