API - Bank of Canada Get USD/CAD


Can someone please help me with using Uipath’s API function. I am trying to retrieve the end of day USD/CAD exchange rate. I need to pull this every time the process is run. I only need one number…the end of day exchange rate. So if i ran the process today (Jan 23) it would give me the end of day rate from Jan 22nd.

Any hep would be great!


try this in HTTP Request activity:

Thanks so much for this! A couple questions:

  1. Can you explain to me how you figured out what to type into the end point?
  2. Can you please show me how to extract just the exchange rate from the output? The output gives me a lot of data…
  1. You gave me the documentation and i read that for you…
  2. Create a string variable to receive the Output Result
  3. Use Deserialize JSON activity and use there the variable and the output should go to a new variable myJsonObject (type JObject)
  4. Create string variable for the rate and assign like this: jsonobject(“observations”)(0)(“FXUSDCAD”)(“v”).ToString

Thanks! How did you know the recent should be 1? Sorry, i’m really really new and a dumbass

cause if you put more than one, it will bring from the days before…

So you just used trial and error?

no, the documentations states that, but i did try with 5 at first and saw 5 days in there…

Ah got it. Thanks so much. Sorry again for the dumbassery. I’m learning as I go…

1 Like

no problem! happy learning!

1 Like

Can you please explain the jsonobject(“observations”)(0)(“FXUSDCAD”)(“v”) portion? I kind of get it but not really. What does the (0) represent?

that part Observations could be many items (an array) but in our case we only wanted 1 result, so the 0 represent the position of the item we wanted, if we asked for 2 days instead of one, we could access the second item by changing the 0 to a 1.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.