How to get exchange rates for currencies

Hi HubSpot community

I’ve created a some additional currencies on my developer account through the HubSpot UI and I can fetch the currency ISO-codes with the “/account-info/v3/details” endpoint.

How do I fetch the exchange rates linked with these additional currencies?

Hi, @MPuge :waving_hand: Thanks for reaching out. If you’re asking for an available endpoint, there is not one listed in the API documentation. Adding your suggestion to the Ideas Community and getting some upvotes will be very helpful in getting your suggestion in front of the Product team. Please add a link back to your Idea post, and I’ll be sure to give it an upvote to help get the ball rolling.

If you are building with CMS Hub, here is a link to the HubL for format_currency.

Best,

Jaycee

Hi @MPuge

Indeed, there is no other data from that endpoint that will give you the conversion. Like what @Jaycee_Lewis said, it’d be best if you drop an idea on the community boards.

However I have an idea to this, if you must somehow retrieve the rates through API. Say, you create X number of deals (based on how many currencies you’ve got). Within each deal, put the amount as $1 and select one of the currency. The property called “Amount in company currency” will auto-calculate based on your currency. That, will then be the exchange rate. Be sure to give these deals a special custom property to tag them, then you can use the /crm/v3/objects/deals/search endpoint to fetch those deals only. Do some JSON parsing, and reverse calculate if you must, and there you’ll have a list of your “exchange rates”.

Hope this helps!

Cheers

WL