Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
how to get historical data on customized data

I have the following code, and am able to get the current price of VX1, but fail to get the historical ones. The error message is

ValueError: invalid literal for int() with base 10: 'VX1'

Can someone help me on this?

def initialize(context):  
    fetch_csv('https://www.quandl.com/api/v1/datasets/CHRIS/CBOE_VX1.csv',  
        date_column='Trade Date',  
        date_format='%Y-%m-%d',  
        symbol='VX1',  
        post_func=rename)

    schedule_function(  
        rebalance,  
        date_rules.every_day(),  
        time_rules.market_open()  
    )

def rebalance(context, data):

    window = 21 # days  
    vx1price = data.current('VX1',"price")        #this works  
    vx1history = data.history(['VX1'],"price", window, "1d")         #this doesn't works