Quandl API Documentation

Welcome to Quandl. You'll find comprehensive guides and documentation to help you start working with Quandl as quickly as possible, as well as support if you get stuck. Let's get started.

Documentation    

Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

INSTALLATION & AUTHENTICATION

INSTALLATION

You can download the Quandl R package from CRAN or from GitHub. Follow the installation instructions below.

A package is a collection of functions, data and documentation that extends R's basic functionality.

To install and load the Quandl R package from CRAN:

install.packages("Quandl")
library(Quandl)

To install the Quandl R package from GitHub using devtools:

install.packages("devtools")
library(devtools)
install_github("quandl/quandl-r")
library(Quandl)

AUTHENTICATION

The Quandl R package is free. If you would like to make more than 50 calls a day, however, you will need to create a free Quandl account and set your API key.

Similarly, you must set your API key to download the premium databases to which you are subscribed.

To make full use of the package, set your API key as follows:

  1. Create or sign into your account here.
  2. Input your API key (with quotation marks) into the console: Quandl.api_key("YOURAPIKEY").

Formats and types

Return types

The supported return types for the Quandl() function are:

To request a specific type, assign the type argument and the return type.

For example: data <- Quandl('NSE/OIL', type = "xts")

Date formats

zoo, xts, and ts have their own time-series date formats.

For example: data <- Quandl('NSE/OIL', collapse = "quarterly", type = "zoo", limit = 3)

data will have indexes 2016 Q3, 2016 Q4, and 2017 Q1:

Open High Low
2016 Q3 459.8 462.8 452.45
2016 Q4 448.0 451.7 445.10
2017 Q1 456.0 465.0 454.15

NOTE: For conciseness, only three data columns appear in the above example response.

INSTALLATION & AUTHENTICATION