从quandl.com下载数据并想知道我如何在我的请求中包含我的API密钥?

时间:2016-10-23 21:07:39

标签: python api-key quandl

我正在使用python从quandl.com下载数据,今天我已达到50次下载的限制。拥有帐户的用户可以超过我已设置帐户的此限制。错误消息说我需要把我的api密钥与请求放在一起,但据我所知它并没怎么说?

这是错误消息

quandl.errors.quandl_error.LimitExceededError: (Status 429) (Quandl Error QELx01) You have exceeded the anonymous user limit of 50 calls per day. To make more calls today, please register for a free Quandl account and then include your API key with your requests.

这是我正在使用的代码,除了请求限制

import quandl
import pandas as pd
from datetime import datetime
import pandas.io.data as web

symbols = ['BOE/XUDLTWD','BOE/XUDLCDS','tvix'] 



pnls = {}
for i in symbols:

    a = '/' in i

    if a == True:
        data = quandl.get(i ) 
        t = i.split('/')
        df1= pnls
        df1[str(t)] = data
        print(a)

2 个答案:

答案 0 :(得分:4)

如何正确使用api密钥。

data = Quandl.get('what', authtoken='your_api_key')

答案 1 :(得分:0)

对于API key,您必须先在quandl中登录,登录后,您将获得您的API Key。 然后data = Quandl.get('what', authtoken='your_api_key')如上答案