I have a list of database id and stock indicies which I use to withdraw the related price data.
lis = {{4470, "^AEX"}, {4471, "^AFLI"}, {4472, "^AORD"}}
I use the following function to get the price data:
Map[
FinancialData[#, "OHLC", {{2015, 1, 1}, {2015, 1, 5}}] &,
lis[[All, 2]]]
As a result I get:
{{{{2015, 1, 2}, {425.89, 428.09, 420.35, 422.28}}, {{2015, 1, 5}, {420.06, 424.58, 410.49, 410.94}}}, {{{2015, 1, 2}, {5563.4, 5587.7, 5535., 5586.3}}, {{2015, 1, 5}, {5586.3, 5622.1, 5578.9, 5598.3}}}, {{{2015, 1, 2}, {5388.6, 5415., 5366.4, 5415.}}, {{2015, 1, 5}, {5415., 5447.6, 5409.4, 5429.5}}}}
Now I would like to append the related database id to each data set (to enter the data in a mySQL database). I would like to get a list as follows (append the database id - eg. 4470):
{{{{2015, 1, 2}, {425.89, 428.09, 420.35, 422.28, 4470}}
For performance reasons I don´t like to use a loop function.