---
title: "Get FX Rate"
source_url: https://docs.rapyd.net/en/get-fx-rate.html
lang: en
---

# Get FX Rate

Retrieve a foreign exchange rate for conversion of currencies in payments and payouts.

The FX rate returned reflects the rate at that point in time. The FX rate may vary, depending on the time and the transaction details. The rate includes the FX markup fees.

> **Note:**
>
> 1. In the sandbox, the FX rate is based on test data.
> 2. This endpoint replaces the deprecated endpoint - `GET /v1/rates/daily`
>
>    Rapyd no longer supports the deprecated endpoint.

### Parameters

### Request Query Parameters

- - action_type
  - Determines the type of transaction that the currency exchange applies to. One of the following:

    - **payment**
    - **payout**
- - amount
  - Amount of the currency exchange transaction, in units of the `fixed_side` currency. Decimal.
- - buy_currency
  - Defines the currency purchased in the currency exchange transaction. Three-letter ISO 4217 code.

    > **Note:**
    >
    > The sandbox environment supports four-letter codes for stablecoin payouts.
- - date
  - The date when the rate is applicable. Today or earlier. Format: **YYYY-MM-DD**
- - fixed_side
  - Indicates whether the rate is fixed for the currency defined by `buy_currency` or `sell_currency`. One of the following:

    - **buy**
    - **sell**
- - sell_currency
  - Defines the currency sold in the currency exchange transaction. Three-letter ISO 4217 code.

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Response Parameters

- - action_type
  - The type of transaction that the currency exchange applies to. One of the following:

    - **payment**
    - **payout**
- - buy_amount
  - If `fixed_side` is **buy**, the value of `amount`. If `fixed_side` is **sell**, the value of `buy_currency` following the currency exchange transaction. Relevant when `amount` and `fixed_side` are specified.
- - buy_currency
  - The currency purchased in the currency exchange transaction. Three-letter ISO 4217 code.

    > **Note:**
    >
    > Four-letter codes for stablecoin payouts .
- - date
  - The date when the rate is applicable. Today or earlier. Format is **YYYY-MM-DD**.

    today
- - fixed_side
  - Indicates which currency the rate is fixed for. One of the following:

    - **buy** - The currency defined by `buy_currency`.
    - **sell** - The currency defined by `sell_currency`.
- - rate
  - The exchange rate. Includes FX markup fees.
- - sell_amount
  - If `fixed_side` is **sell**, the value of `amount`. If `fixed_side` is **buy**, the value of `sell_currency` following the currency exchange transaction. Relevant when `amount` and `fixed_side` are specified.
- - sell_currency
  - The currency sold in the currency exchange transaction. Three-letter ISO 4217 code.

    > **Note:**
    >
    > Supports four-letter codes for stablecoin payouts.

- /v1/fx_rates

- Payment
- ```curl
  curl -X get
  https://sandboxapi.rapyd.net/v1/fx_rates?action_type=payment&buy_currency=USD&sell_currency=EUR
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "aea11ec0-0d10-460a-81a9-d83d71620a9d"
      },
      "data": {
          "sell_currency": "USD",
          "buy_currency": "ISK",
          "fixed_side": "buy",
          "action_type": "payment",
          "rate": 128.1629678715,
          "date": "2024-06-15",
          "sell_amount": 7.8,
          "buy_amount": 1000
      }
  }
  ```

- Payout
- ```curl
  curl -X get
  https://sandboxapi.rapyd.net/v1/fx_rates?action_type=payout&buy_currency=USD&sell_currency=SGD
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'idempotency: your-idempotency-parameter-here'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "0c12bfeb-8b79-4f11-b522-0d09d84ba86f"
      },
      "data": {
          "sell_currency": "SGD",
          "buy_currency": "USD",
          "fixed_side": null,
          "action_type": "payout",
          "rate": 0.716238,
          "date": "2024-06-15",
          "sell_amount": null,
          "buy_amount": null
      }
  }
  ```

- Payout - USDC stablecoin
- ```curl
  curl -X get
  https://sandboxapi.rapyd.net/v1/fx_rates?action_type=payout&buy_currency=USDC&sell_currency=USD
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
  	"status": {
  		"error_code": "",
  		"status": "SUCCESS",
  		"message": "",
  		"response_code": "",
  		"operation_id": "360c1846-33e3-4f4c-9ee3-81eb0b455a7e"
  	},
  	"data": {
  		"sell_currency": "USD",
  		"buy_currency": "USDC",
  		"fixed_side": null,
  		"action_type": "payout",
  		"rate": 0.9215,
  		"date": "2025-04-07",
  		"sell_amount": null,
  		"buy_amount": null
  	}
  }
  ```
