Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
JimB-GA
Helper III
Helper III

Intraday ETF prices in Power BI

I've asked the question before, but I was unclear.

 

I would like to download intraday prices for the ETF 'SPY'.  The interval can be up to two hours.   Can anyone tell me if there is a visual or R script to accomplish this?

 

Thanks for the advice.

 

Jim-B

2 REPLIES 2
JimB-GA
Helper III
Helper III

I have been able to retrieve current intraday pricing in an R script

current = quantmod::getQuote('SPY')

when I look at the 'current' table it returns all the information that I need except that the Trade Time shows as a large integer number ( in this case 1545851547).  The trade time for this time when I run it in RStudio returns "12/26/2018 14:26"

Is there a conversion factor that I am missing?

 

Trade Time           Last      Change       % Change     Open      High       Low        Volume

1545851547241.086.74000552.8761652235.97241.39233.76124540382

That looks like an epoch time to me (# of seconds since January 1, 1970).

 

Check out this thread for converting to a something more readable:

https://community.powerbi.com/t5/Desktop/Converting-UNIX-time-to-Date-in-PowerBI-for-Desktop/td-p/13...

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors