Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

CAD_USD.txt and USD_CAD.txt - Are these files updating properly for everyone else?

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.



  • Hi Buddyb,

    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

  • Thanks for your quick reply, Vidas. (Your reply is perfect and tells me what I need to do).
    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 am from Belgium and I am using also the ECB file for my EURO/USD conversion rates and I noticed a problem in loading the ECB file from the ECB webpage, starting around 21 sep 2022.

    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;" 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
  • Well done Luc!
    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.
  • Luc - thank you for this code. I have no idea what it does, but I'll see if I should add it to the script(s).
Sign In or Register to comment.