How do I get parameters for the built-in `request.quandl()` function?

Nasdaq Data Link (formerly known as Quandl)  is a marketplace for financial, economic, and alternative data. In order to get parameters for the `request.quandl()` function, let’s first break down the different parts of this built-in function.

request.quandl(ticker, gaps, index)

ticker - a string, the name of the Nasdaq Data Link symbol in the form “QUANDL:{QUANDL_CODE}”.

gaps - a parameter, similar to the gaps parameter in the request.security() function. If the parameter has the value barmerge.gaps_on, then values are displayed only on bars corresponding to the date of data publication.

index - the number of the data series of the symbol.

The ticker and index parameter values can be found on the Nasdaq Data Link website.

Let’s say, for example, that you want to get data on the Consumer Sentiment Index from the University of Michigan. In order to do this, you would need to search for it on the Nasdaq Data Link website and go to the symbol page.

In the upper - right hand corner of the page, you can find the ticker, EOD/AAPL parameter.

To access the index parameter, you will need a quandl account. After registering and logging in, you can find the index parameter from the available list:


Note that the numbering starts from 0. In other words, if you need to get data for the Consumer Sentiment Index for the age group 55+, the index parameter needs a value set at 2. Keep this in mind when you are looking to access specific parameter data.