Getting error i.e incorrect quandl code , can you please tell how can we fetch put call data

Data1 = fetch_data("CBOE/SPX_PC", "5Fxm1Dgr5fZvbyeVQUpG", "2017-07-31", "local_data.csv")

 

NotFoundError: (Status 404) (Quandl Error QECx02) You have submitted an incorrect Quandl code. Please check your Quandl codes and try again.

You can try this code:



Data1 = quandl.get ('CBOE/SPX_PC', start_date='2017-07-31', api_key = 'Your API KEY')



For more details, check out this link.



 

It seems like 'CBOE/SPX_PC' only works with subscription. Other codes that are free of distribution works fine except this line.

To get an API key, first, you need to sign up on Quandl. You can find your API key on account settings.

Replace 'YOUR API KEY' line in code with the API key you get from Quandl. 

Data1 = quandl.get ('CBOE/SPX_PC', start_date='2017-07-31', api_key = 'Your API KEY')

I have tried using these steps and my code is working fine. You can try the same. Hope it will work for you also.

Does not work  - code SPX_PC not found,

I am able to fetch data using this ''CBOE/SPX_PC" Quandl code. Could you please share your code along with the error you are getting.

Hi Vibhu,



It doesn't work for me either.

Here is the error.

NotFoundError: (Status 404) (Quandl Error QECx02) You have submitted an incorrect Quandl code. Please check your Quandl codes and try again.

Thanks.

Hello @Cat Smith and @Renato Oliveira Fraga !



The Quandl API has changed since the time of writing the original Quantra course.

The API keys issued by quandl, which worked on v2 of the endpoint still give the data for 'CBOE/SPX_PC'. That's why the quantra environment's API key still works.



We tested different accounts in Quandl running different versions of the python package, as well as the API endpoint(latest being v3) using curl. The error was the same as faced by you above.



To resolve this, consider these 3rd party resources:

  1. Quantconnect blog
  2. CBOE historical data: Cboe Total Exchange Volume and Put/Call Ratios (11-01-2006 to 10-04-2019)
  3. Ycharts
  4. Paid Quandl dataset : QOA / SPX

    To get up to date CBOE, you may need to pythonically fetch the data from CBOE for each day and compile the database at your end. 



    Apologies for the inconvenience caused, but this issue is due to a 3rd party dependency. Hopefully, the above links and explanations can help you!

Thanks Gaurav, I was able to get the update data from CBOE fetching the data pythonically.



 

HI Gaurav,

could you please send us the code for 

"To get up to date CBOE, you may need to pythonically fetch the data from CBOE for each day and compile the database at your end"



Tanks a lot

Hi Alessandro,



We do not have a ready module to fetch the data, but as previous users have pointed out, they have successfully done the same.



You can refer to various articles on how to fetch data from websites using the BeautifulSoup package.



Hope this helps!