Changing just the line

assetHistory(Loop1,FROM_QUANDL);

to

assetHistory(Loop1,FROM_AV);

downloads the data just fine (even though assets.csv still refers to QUANDL). So how to make it work with quandl?