> ## Documentation Index
> Fetch the complete documentation index at: https://xchangeapi.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Currency conversion

Convert a specific amount from one currency to another using the latest available exchange rates. This endpoint performs real-time currency conversion calculations, making it easy to handle cross-currency transactions in your application.

The returned data includes the timestamp of the conversion rate used, ensuring transparency for financial calculations.

<Info>
  **Note on Precision**: Some currency pairs are returned with a [multiplier](/docs/http/metadata/multipliers) (e.g., 100 or 1000) to ensure high precision.
</Info>

### Query parameters

<ParamField path="from" type="string" required>
  The 3-letter currency code of the source currency (e.g., `USD`, `EUR`). See the list of [available pairs](/docs/guides/available-currencies).
</ParamField>

<ParamField path="to" type="string" required>
  The 3-letter currency code of the target currency (e.g., `GBP`, `JPY`). See the list of [available pairs](/docs/guides/available-currencies).
</ParamField>

<ParamField path="amount" type="decimal" required>
  The value to convert.
</ParamField>

### Response

<ResponseField name="info" type="object">
  Metadata about the conversion rate used.

  <ResponseField name="timestamp" type="string">
    The Unix timestamp (epoch) when the rate was collected.
  </ResponseField>

  <ResponseField name="rate" type="string">
    The exchange rate used for this conversion.
  </ResponseField>
</ResponseField>

<ResponseField name="query" type="object">
  Echoes the parameters used in the request.

  <ResponseField name="from" type="string">
    Source currency code.
  </ResponseField>

  <ResponseField name="to" type="string">
    Target currency code.
  </ResponseField>

  <ResponseField name="amount" type="decimal">
    Amount converted.
  </ResponseField>
</ResponseField>

<ResponseField name="result" type="string">
  The calculated converted amount.
</ResponseField>

<ResponseExample>
  ```json Example response theme={null}
  {
    "info": {
      "timestamp": "1766937316.276",
      "rate": 1.17697
    },
    "query": {
      "to": "USD",
      "amount": 10,
      "from": "EUR"
    },
    "result": 11.7697
  }
  ```
</ResponseExample>
