Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using Rest Connector to fetch data from S&P 500 to get the data for a specific ticker.
Below is my auto-generated script -
RestConnectorMasterTable:
The connection is established; however I am getting the data in the below format.
Whereas, I need the data in a single normalized table as below columns, kindly help.
Date Open High Low Close Volume
Hello, something like below should work:
// 1. Define your date range boundaries
LET vStartDate = Num(Date#('2026-07-20', 'YYYY-MM-DD'));
LET vEndDate = Num(Date#('2026-07-24', 'YYYY-MM-DD'));
// 2. Loop through each date in the range
FOR vDateNum = vStartDate TO vEndDate
// Format the current loop date to match your API key format
LET vCurrentDate = Date($(vDateNum), 'YYYY-MM-DD');
// 3. Load the data dynamically for the specific date
TimeSeriesData:
LOAD
'$(vCurrentDate)' AS [Date],
[1. open] AS [Open],
[2. high] AS [High],
[3. low] AS [Low],
[4. close] AS [Close],
[5. volume] AS [Volume];
SELECT
"1. open",
"2. high",
"3. low",
"4. close",
"5. volume"
FROM "$(vCurrentDate)" FK "__FK_$(vCurrentDate)";
NEXT vDateNum;
Hi @Ryan101 ,
Can you share the REST API that you are using with us? Is that something public?
I'm also missing the rest of your Load Script. Can you please share your full code?
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com