set the Quandl API authentication token
Adding SetToken to Your Personal Initialization File
string; the Quandl API authentication token to be used for API calls
(optional) an equation of the form premium=truefalse; denotes whether the token is a premium token and defaults to false
The SetToken commands sets the authentication token used for Quandl API calls.
By default, Maple does not use an authentication token for Quandl API calls. That is, API calls are made anonymously.
Anonymous API calls can only access public databases and are limited in the number of requests that can be made per day.
If you have a Quandl authentication token, use SetToken("yourToken") to perform more Quandl API requests and to access premium databases you have purchased. See http://www.quandl.com/ for more information on the Quandl API and authentication tokens.
The premium option is used by Maple to determine what errors to return when a request fails. It does not allow you to access to premium databases.
The default value for the premium option is false. In this case, Maple returns a warning and an empty data set the first time you request data from a premium database. After that, only the empty data set is returned (that is, Maple knows not to expect valid data sets for every request).
Set premium = true if you have access to premium databases. In this case, Maple always returns an error if your request results in an empty data set.
SetToken returns the value of the previous authentication token.
Add SetToken to your personal initialization file in order to set your Quandl authentication token every time you start or restart Maple.
The following command sets the Quandl authentication token to an empty string (that is, API calls are anonymous) and sets the premium option to false, which is the same as the default authentication method used by Maple. The command returns the value of the previous token.
Your personal initialization file contains Maple commands that run every time you start or restart Maple.
If you have a Quandl authentication token, add the SetToken command to your initialization file in order to perform more requests and to access your premium databases.
To add SetToken to your personal initialization file:
Open a text editor.
If you have an initialization file, open it. If not, create a new one.
Note: The location and name of your personal initialization file depend on your operating system:
Linux or Mac: <homeDirectory>/.mapleinit
Where <homeDirectory> is the output from the kernelopts(homedir) command.
Add the following command to your initialization file:
DataSets:-Quandl:-SetToken("yourToken", premium = premiumAccess ):
Where yourToken is your Quandl authentication token and premiumAccess is either true or false, depending on your Quandl access level.
Save and then close your initialization file.
To test your initialization file, open a new Maple worksheet and then run the command you entered in step 3. The output should be your Quandl authentication token.
Note: If you do not get your authentication token, then Maple is using another initialization file. See Create Maple Initialization File for details on where Maple looks for initialization files.
The DataSets[Quandl][SetToken] command was introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
Create Maple Initialization File
Download Help Document