---
agentTools:
  projectIndex: https://docs.o21.io/llms.txt
---

# Latest Forex Rates

Return real-time exchange rate data which gets updated every 5 minutes

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "O21Pay API Reference",
    "summary": "O21Pay API Reference",
    "description": "O21Pay API Reference",
    "version": "1.0.0"
  },
  "paths": {
    "/market-forex": {
      "get": {
        "tags": [
          "Others"
        ],
        "summary": "Latest Forex Rates",
        "description": "Return real-time exchange rate data which gets updated every 5 minutes",
        "parameters": [
          {
            "name": "clientid",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "secret",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "description": "To Currency",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "EUR"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MarketForex"
                      },
                      "description": ""
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Check the parameters or the syntax"
          },
          "401": {
            "description": "Unauthorized Couldn’t authenticate the request"
          }
        }
      }
    }
  },
  "security": [],
  "servers": [
    {
      "url": "https://o21c.obvious21.com/api/v1",
      "description": ""
    },
    {
      "url": "https://sandbox-o21c.obvious21.com/api/v1",
      "description": ""
    }
  ],
  "components": {
    "schemas": {
      "MarketForex": {
        "title": "MarketForex",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Currency Name"
          },
          "currency_code": {
            "type": "string",
            "description": "Currency Code"
          },
          "symbol": {
            "type": "string",
            "description": "Currency Symbol"
          },
          "decimals": {
            "type": "number",
            "description": "Number of decimals"
          },
          "countries": {
            "type": "string",
            "description": "Countries"
          },
          "value": {
            "type": "number",
            "description": "Current rate"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Others",
      "description": "Others functions"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 26,
      "2": 207,
      "3": 68,
      "4": 10,
      "5": 95,
      "6": 186,
      "7": 0,
      "8": 31,
      "9": 209,
      "10": 87,
      "11": 132
    }
  }
}
```