---
title: Retrieve an FX rate.
slug: fx-api/retrieve-an-fx-rate
docTags: 
createdAt: 2025-05-30T02:39:22.452Z
---

{
  "id": "Vd8TtzDduiE8FU3brvXYI",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://sand-api.monoova.com/global/v1/rate",
    "servers": [
      {
        "url": "https://sand-api.monoova.com/global/v1/rate",
        "description": "Monoova Global server"
      }
    ],
    "name": "Retrieve an FX rate.",
    "description": "<p>This indicates the current customer exchange rate for the given base currency and counter currency pair, along with the date it was last updated. Both base and counter currency are required. This can be called before creating a transaction quote.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "base_currency_id",
          "type": "integer",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "base_currency_code",
          "type": "object",
          "description": "<p>Either this or the base_currency_id is required.</p>",
          "customType": "CurrencyCode",
          "schema": [],
          "modelRef": "#/components/schemas/CurrencyCode"
        },
        {
          "kind": "optional",
          "name": "counter_currency_id",
          "type": "integer",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "counter_currency_code",
          "type": "object",
          "description": "<p>Either this or the counter_currency_id is required.</p>",
          "customType": "CurrencyCode",
          "schema": [],
          "modelRef": "#/components/schemas/CurrencyCode"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "A rate.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "rate",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/Rate",
                "customType": "Rate",
                "schema": []
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "yZDX_Ie6PXHCKe8chotVi",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://sand-api.monoova.com/global/v1/rate?base_currency_code=object&counter_currency_code=object' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "Sa5ZwDRVBKp4dRVwDnMGB",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://sand-api.monoova.com/global/v1/rate?base_currency_code=object&counter_currency_code=object\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "BIvtPFfuT7b4hHKCmdbwj",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://sand-api.monoova.com/global/v1/rate?base_currency_code=object&counter_currency_code=object\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Hnh-Ss-RVGwtG6tKn9r94",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://sand-api.monoova.com/global/v1/rate?base_currency_code=object&counter_currency_code=object\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "yZDX_Ie6PXHCKe8chotVi"
    },
    "results": {
      "languages": [
        {
          "id": "GGEP4LM-1Gzei49ypLdAh",
          "language": "200",
          "code": "// A rate.\n{\n  \"rate\": {}\n}"
        }
      ],
      "selectedLanguageId": "GGEP4LM-1Gzei49ypLdAh"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}