Skip to main content
Jul 9, 2019 5:38 AM UTC
Question

Currency Converter API

Hi,

 

Is there any currency conversion API available for Thingworx ?

 

I want to convert one currency value into another based on user selection(with current value of currency).

 

Regards,

Chahat

2 replies

Jul 9, 2019 6:40 AM UTC

There isn't, but shouldn't be hard to contact an external API to do that.

Jul 11, 2019 11:01 AM UTC

I tried using the below snippet :

 

var URL = 'https://free.currconv.com/api/v7/convert?q=USD_PHP&compact=ultra&apiKey=eb3711cd74de3b2d3c92';

 

//JSON object to send

var HeaderJson = {

"Content-Type" : "application/json",

"Accept" : "application/json",

"apiKey" : "eb3711cd74de3b2d3c92"

};

 

//var content = "application/json";

 

 

var params = {

headers: HeaderJson /* JSON */,

url: URL/* STRING */

//content: content

};

 

// result: JSON

var jsonresult = Resources["ContentLoaderFunctions"].PostText(params);

 

It is giving an error : " Error executing service test. Message :: Received fatal alert: handshake_failure - See Script Error Log for more details."