Is there a way to download TSP share prices in a CSV file format

General TSP Discussion.

Moderator: Aitrus

Post Reply
MrSnrub
Posts: 98
Joined: Sun Jun 26, 2016 8:21 am

Is there a way to download TSP share prices in a CSV file format

Post by MrSnrub »

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?
Nobody knows what the market is going to do in the future. Stop asking. Just shut up and follow strategy #72033 to glory.

nilber
Posts: 1
Joined: Sat Jun 04, 2022 3:20 pm

Re: Is there a way to download TSP share prices in a CSV file format

Post by nilber »

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.

MrSnrub
Posts: 98
Joined: Sun Jun 26, 2016 8:21 am

Re: Is there a way to download TSP share prices in a CSV file format

Post by MrSnrub »

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.

User avatar
mjedlin66
Site Admin
Posts: 1494
Joined: Wed Oct 02, 2013 7:51 pm

Re: Is there a way to download TSP share prices in a CSV file format

Post by mjedlin66 »

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"

User avatar
Aitrus
Moderator
Posts: 2300
Joined: Mon Aug 06, 2012 5:03 pm

Re: Is there a way to download TSP share prices in a CSV file format

Post by Aitrus »

mjedlin66 wrote: Mon Jun 06, 2022 4:38 am I applaud you guys for sharing the info with each other that I had to figure out the hard way.
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

Post Reply

Fund Prices2022-06-23

FundPriceDayYTD
G $16.92 0.01% 1.09%
F $18.70 0.37% -10.46%
C $57.73 0.96% -19.76%
S $60.75 1.72% -27.19%
I $31.69 -0.31% -19.66%
L2065 $11.82 0.62% -20.59%
L2060 $11.82 0.62% -20.59%
L2055 $11.82 0.62% -20.58%
L2050 $24.70 0.54% -17.73%
L2045 $11.39 0.51% -16.70%
L2040 $42.04 0.47% -15.57%
L2035 $11.25 0.44% -14.31%
L2030 $37.92 0.40% -12.97%
L2025 $11.14 0.28% -9.07%
Linc $22.33 0.17% -4.93%

Live Charts

Pending Allocations

Under development. For now, you may view Pending Allocations by going to "fantasy TSP" and selecting "Leaderboard sort" of "Pending Allocations".