Sending different system commands for each element in a list

Hello I know that in q loops should be avoided but I don’t see how to do this:

I have to send to a REST API a command like this:

q)system “curl -s -k -H "Authorization: Bearer MyToken" "https://api-fxpractice.oanda.com/v1/candles?instrument=EUR_JPY&granularity=D&count=5&candleFormat=bidask\”"

the command has to be sent count list times and the parameter instrument should carry sequentially each element in list

list:EUR_USDEUR_JPY`GBP_JPY

The information retrieved from the REST API should be stored in a unique table or in a table per element.

Cheers

Francisco

use each.

system each {“curl -s -k -H "Authorization: Bearer MyToken" "https://api-fxpractice.oanda.com/v1/candles?instrument=“,string[x],”&granularity=D&count=5&candleFormat=bidask\”"} each list

This will get the data. Then set it into a variables or do whatever you want with it…

a1a2a3 set' {@[system;x;cant]} each {“curl -s -k -H "Authorization: Bearer MyToken" "https://api-fxpractice.oanda.com/v1/candles?instrument=“,string[x],”&granularity=D&count=5&candleFormat=bidask\”"} each list

Thanks,

Sean

Wow… I’m speechless.

Thanks

Francisco