Is there a way to download TSP share prices in a CSV file format
Moderator: Aitrus
Is there a way to download TSP share prices in a CSV file format
Before the Great TSP Redesign From Hell, I would use the following URL to download the share prices in a CSV (comma-separated value) file format:
https://secure.tsp.gov/components/CORS/ ... download=1
Does anybody know of a way to replicate this? Or if the official TSP site plans on re-inserting this functionality in the future?
https://secure.tsp.gov/components/CORS/ ... download=1
Does anybody know of a way to replicate this? Or if the official TSP site plans on re-inserting this functionality in the future?
Nobody knows what the market is going to do in the future. Stop asking. Just shut up and follow strategy #72033 to glory.
Re: Is there a way to download TSP share prices in a CSV file format
I've been trying to sort it out but haven't been entirely successful. I've extracted the following from the source code that does technically return CSV formatted data.
https://secure.tsp.gov/data/getSharePri ... oad_1.html
What I haven't been able to accomplish is passing the specific dates and funds I want to "download". I use a script in an Access database to pull updated share prices since the last time I ran the script.
The portion "getSharePrices_startdate_20220424_enddate_20220524_Lfunds_1_InvFunds_1_download_1" is not a parameter string being passed back to the server. Instead it is hard coded into the JavaScript and appears to me that it is all still a work in progress, although several TSP sites have either cracked the code or have someone manually transcribing the share prices.
https://secure.tsp.gov/data/getSharePri ... oad_1.html
What I haven't been able to accomplish is passing the specific dates and funds I want to "download". I use a script in an Access database to pull updated share prices since the last time I ran the script.
The portion "getSharePrices_startdate_20220424_enddate_20220524_Lfunds_1_InvFunds_1_download_1" is not a parameter string being passed back to the server. Instead it is hard coded into the JavaScript and appears to me that it is all still a work in progress, although several TSP sites have either cracked the code or have someone manually transcribing the share prices.
Re: Is there a way to download TSP share prices in a CSV file format
That actually should work great for now! I just need to adjust my script a little, but that shouldn't be a problem. Thank you!
Nobody knows what the market is going to do in the future. Stop asking. Just shut up and follow strategy #72033 to glory.
Re: Is there a way to download TSP share prices in a CSV file format
I applaud you guys for sharing the info with each other that I had to figure out the hard way.
Owner/creator of TSPcalc.com - "Know your numbers"
Re: Is there a way to download TSP share prices in a CSV file format
That's always been one of my favorite things about this place: how the community members help each other understand the system better.
Seasonal Musings 2022: viewtopic.php?f=14&t=19005
Recommended Reading: http://tspcenter.com/forums/viewtopic.php?f=14&t=13474
"It's not what happens to you, but how you react to it that matters" Epictetus
Recommended Reading: http://tspcenter.com/forums/viewtopic.php?f=14&t=13474
"It's not what happens to you, but how you react to it that matters" Epictetus
Re: Is there a way to download TSP share prices in a CSV file format
Arrgh! Broken again! Or at least not updated with 6/27/2022 data like the main Share Prices page is.
https://www.tsp.gov/data/getSharePrices ... oad_1.html
https://www.tsp.gov/data/getSharePrices ... oad_1.html
Nobody knows what the market is going to do in the future. Stop asking. Just shut up and follow strategy #72033 to glory.
Re: Is there a way to download TSP share prices in a CSV file format
Change ".html" to ".csv" and you'll be off to the races again.MrSnrub wrote: ↑Tue Jun 28, 2022 6:35 am Arrgh! Broken again! Or at least not updated with 6/27/2022 data like the main Share Prices page is.
https://www.tsp.gov/data/getSharePrices ... oad_1.html
Owner/creator of TSPcalc.com - "Know your numbers"
Re: Is there a way to download TSP share prices in a CSV file format
Works great (for now), thanks a bunch!
And as a warning, the HTML file linked above now gives incorrect data. It just puts in yesterday's data for June 24th. DO NOT USE IT.
And as a warning, the HTML file linked above now gives incorrect data. It just puts in yesterday's data for June 24th. DO NOT USE IT.
Nobody knows what the market is going to do in the future. Stop asking. Just shut up and follow strategy #72033 to glory.
Re: Is there a way to download TSP share prices in a CSV file format
The new site now has a Download share prices button. It appears to function the same as the old site.
“The genius of investing is recognizing the direction of the trend – not catching the highs or the lows.”
- Dean Witter
"Put all your eggs in one basket and then watch that basket."
- Andrew Carnegie
- Dean Witter
"Put all your eggs in one basket and then watch that basket."
- Andrew Carnegie
Re: Is there a way to download TSP share prices in a CSV file format
Arrgh! It's down again. So I don't know what Friday's closing prices were.
Well, I know that the S Fund's price is $61.4532, because if I login to my account and go to the "Investments" section, that's what it says the S Fund's closing price is. Can y'all that are in other funds please log in to your accounts and go to the "Investments" section and tell me what the closing price is for other TSP funds?
Well, I know that the S Fund's price is $61.4532, because if I login to my account and go to the "Investments" section, that's what it says the S Fund's closing price is. Can y'all that are in other funds please log in to your accounts and go to the "Investments" section and tell me what the closing price is for other TSP funds?
Nobody knows what the market is going to do in the future. Stop asking. Just shut up and follow strategy #72033 to glory.
Fund Prices2024-03-27
Fund | Price | Day | YTD |
G | $18.14 | 0.01% | 1.00% |
F | $19.09 | 0.26% | -0.68% |
C | $82.11 | 0.87% | 10.42% |
S | $82.19 | 1.48% | 6.61% |
I | $42.68 | 0.56% | 6.21% |
L2065 | $16.38 | 0.84% | 8.36% |
L2060 | $16.38 | 0.84% | 8.36% |
L2055 | $16.39 | 0.84% | 8.36% |
L2050 | $32.73 | 0.71% | 6.94% |
L2045 | $14.91 | 0.67% | 6.56% |
L2040 | $54.37 | 0.63% | 6.20% |
L2035 | $14.34 | 0.58% | 5.77% |
L2030 | $47.66 | 0.53% | 5.35% |
L2025 | $13.14 | 0.31% | 3.40% |
Linc | $25.60 | 0.24% | 2.79% |