myv@API

Just CURRENCIES - Currency Converter API

 

 

Code examples

At https://rapidapi.com/myvatAPI/api/just-currencies/, you'll find examples in 19 different programming languages to access this API, including popular languages like Node.js, JavaScript and Python. In following basic examples we focus on PHP and retrieve the API using cURL.

 

Example 1: Basic usage

Convert 49.90 United States dollar to Euro with the latest exchange rate:

  <?php
//example 1: basic usage
//source: https://myv.at/api/currency-converter/code-examples/

//start cURL request
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://just-currencies.p.rapidapi.com/convert?amount=49.90&from=USD&to=EUR",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
    "x-rapidapi-host: just-currencies.p.rapidapi.com",
    "x-rapidapi-key: SIGN-UP-FOR-KEY"
    ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);

//exit on all cURL errors
if ($err) {
    echo "cURL Error #:" . $err;
    exit;
}
//end cURL request 
 
//return JSON
echo $response;
?>

This is the returned answer: View example JSON file.

 

Great! That was easy!

There's no more to know to call this API.
Be sure to have also a look at the documentation and the FAQs.

Something missing?

Found a bug? Need something special? Tell us at: currency-converter@myv.at
We'll always be there for you, no matter what.

 

 

 

NEWS:

2021-06-20 - Just CURRENCIES - Currency Converter API officially released on RapidAPI marketplace

2021-05-27 - Currency Converter API closed beta version released

2021-05-07 - SUDOKU All-Purpose PRO API officially released on RapidAPI marketplace

2021-03-19 - SUDOKU All-Purpose PRO API closed beta version released

by myvasco.com · legal notice