Conversión de Monedas
1 min
Conversión de Monedas con API-Keys
GET
https://api.mobbex.com/p/currency/convert
Query Parameters
- fromstringrequiredDescription
- tostringrequiredDescription
- TotalNumberrequiredDescription
Header Parameters
- x-api-keystringrequiredDescription
- x-access-tokenstringrequiredDescription
csharp
var client = new RestClient("https://api.mobbex.com/p/currency/convert?from=USD&to=ARS&total=100");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj");
request.AddHeader("x-access-token", "d31f0721-2f85-44e7-bcc6-15e19d1a53cc");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);javascript
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.mobbex.com/p/currency/convert?from=USD&to=ARS&total=100");
xhr.setRequestHeader("x-api-key", "zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj");
xhr.setRequestHeader("x-access-token", "d31f0721-2f85-44e7-bcc6-15e19d1a53cc");
xhr.send();php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.mobbex.com/p/currency/convert?from=USD&to=ARS&total=100',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-api-key: zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj',
'x-access-token: d31f0721-2f85-44e7-bcc6-15e19d1a53cc'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
200
{
"result": true,
"data": {
"from": "USD",
"to": "ARS",
"total": 100,
"result": 9761,
"rate": 97.61
}
}