---
title: Conversión de Monedas
slug: conversion-de-monedas
description: Learn how to convert currency using API keys in C#, JavaScript, and PHP with this comprehensive code document. Discover how to efficiently make GET requests to the Mobbex API, retrieve crucial information such as the converted amount, exchange rate, and c
icon: 💱
docTags: 
createdAt: 2021-01-25T21:07:15.000Z
---

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://api.mobbex.com/p/currency/convert",
  "name": "Conversión de Monedas con API-Keys",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [
      {
        "kind": "required",
        "name": "from",
        "type": "string",
        "description": "Moneda desde la cual se quiere convertir. Valores Admitidos: USD"
      },
      {
        "kind": "required",
        "name": "to",
        "type": "string",
        "description": "Moneda a la cual se quiere convertir. Valores Admitidos: ARS"
      },
      {
        "kind": "required",
        "name": "Total",
        "type": "Number",
        "description": "Valor a Convertir. Decimales separados por punto."
      }
    ],
    "headerParameters": [
      {
        "kind": "required",
        "name": "x-api-key",
        "type": "string",
        "description": "Clave API de su aplicación."
      },
      {
        "kind": "required",
        "name": "x-access-token",
        "type": "string",
        "description": "Token de Acceso."
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "6ErRQHJMl62jWkv9tQHq0",
        "code": "{\n    \"result\": true,\n    \"data\": {\n        \"from\": \"USD\",\n        \"to\": \"ARS\",\n        \"total\": 100,\n        \"result\": 9761,\n        \"rate\": 97.61\n    }\n}",
        "language": "200"
      }
    ],
    "selectedLanguageId": "6ErRQHJMl62jWkv9tQHq0"
  },
  "examples": {
    "languages": [
      {
        "id": "YbzeNJOuH4ez40Ox26sty",
        "code": "var client = new RestClient(\"https://api.mobbex.com/p/currency/convert?from=USD&to=ARS&total=100\");\r\nclient.Timeout = -1;\r\nvar request = new RestRequest(Method.GET);\r\nrequest.AddHeader(\"x-api-key\", \"zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj\");\r\nrequest.AddHeader(\"x-access-token\", \"d31f0721-2f85-44e7-bcc6-15e19d1a53cc\");\r\nIRestResponse response = client.Execute(request);\r\nConsole.WriteLine(response.Content);",
        "language": "csharp"
      },
      {
        "id": "uaJCTPDPjsEjXInAnlaLU",
        "code": "var xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function() {\n  if(this.readyState === 4) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.mobbex.com/p/currency/convert?from=USD&to=ARS&total=100\");\nxhr.setRequestHeader(\"x-api-key\", \"zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj\");\nxhr.setRequestHeader(\"x-access-token\", \"d31f0721-2f85-44e7-bcc6-15e19d1a53cc\");\n\nxhr.send();",
        "language": "javascript"
      },
      {
        "id": "MwM7WVUWHBUyzwQPoS527",
        "code": "<?php\r\n\r\n$curl = curl_init();\r\n\r\ncurl_setopt_array($curl, array(\r\n  CURLOPT_URL => 'https://api.mobbex.com/p/currency/convert?from=USD&to=ARS&total=100',\r\n  CURLOPT_RETURNTRANSFER => true,\r\n  CURLOPT_ENCODING => '',\r\n  CURLOPT_MAXREDIRS => 10,\r\n  CURLOPT_TIMEOUT => 0,\r\n  CURLOPT_FOLLOWLOCATION => true,\r\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\r\n  CURLOPT_CUSTOMREQUEST => 'GET',\r\n  CURLOPT_HTTPHEADER => array(\r\n    'x-api-key: zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj',\r\n    'x-access-token: d31f0721-2f85-44e7-bcc6-15e19d1a53cc'\r\n  ),\r\n));\r\n\r\n$response = curl_exec($curl);\r\n\r\ncurl_close($curl);\r\necho $response;\r\n",
        "language": "php"
      }
    ],
    "selectedLanguageId": "YbzeNJOuH4ez40Ox26sty"
  },
  "description": "",
  "currentNewParameter": {
    "label": "Query Parameter",
    "value": "queryParameters"
  },
  "autoGeneratedAnchorSlug": "conversin-de-monedas-con-api-keys",
  "legacyHash": "bsDAcMF9yS3_LyLkONTHS"
}
```
:::

