Hi Vidas,
I am posting this a bit early in my troubleshooting sequences, but has anything changed over at the Bank of Canada website where we are getting USD and CAD exchange rates?
I look at my USD_CAD.txt and CAD_USD.txt files and the last entry is 2022-09-21. This is also the last date entry in the "CurrencyConv" tab over in the DataModel.
Regards,
Buddyb
Comments
In my environment I use the following scripts to get Exchange rates:
powershell -ExecutionPolicy Bypass .\Scripts\GetExchRates-ECB.ps1
powershell -ExecutionPolicy Bypass .\Scripts\GetExchRates-YahooIntraday.ps1
I can see that these scripts for properly and I have up-to-date (2022-10-05) exchange rates.
For script GetExchRates_ECB.ps1 timestamp is 2021-01-28
For script GetExchRates_YahooIntraday.ps1 timestamp is 2022-02-17
I am convinced my problem is on my end.
I have been using "ECB" and NOT "Bank of Canada" for Exchange rates.
I am currently laying out a few copies of the two files you mention above and checking for any changes.
I have been looking on the internet for a "medicine" and found it.
I added the next 2 lines, just in front of the statement "$wcD = new-object system.net.WebClient;" and when executing the script, the ECB file is downloaded correctly from the internet
$AllProtocols = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols
I applied your suggested "patch" to the "GetExchRates-ECB.ps1" script file, and my issues with exchange rates in PS vanished. I owe you one or two pints (someday).
Thank you for your insights and contribution to Vidas's PortfolioSlicer Project.
BuddyB