The Currency Switcher saves the order total converted to the shop's base currency alongside the total in orders' currency. You can easily infer the exchange rate by calculating it from those two values, as follows:

WooCommerce 3.0 and newer

```\$order_id = 123;
// Retrieve the order
\$order = wc_get_order(\$order_id);
// Get order total in order currency
\$order_total = \$order->get_total();
// Get order total in base currency
\$order_total_base_currency = \$order->get_meta('_order_total_base_currency');

// Set a a default exchange rate, in case any of the totals is not valid.
// Here we return "1", implying that no currency conversion was performed.
\$exchange_rate = 1;

// Ensure that we are dealing with two valid values
if((\$order_total > 0) && (\$order_total_base_currency > 0)) {
// Calculate the exchange rate from the two totals
\$exchange_rate = \$order_total_base_currency / \$order_total;
}```

WooCommerce 2.6 and earlier

```\$order_id = 123;
// Retrieve the order
\$order = wc_get_order(\$order_id);
// Get order total in order currency
\$order_total = \$order->get_total();
// Get order total in base currency
\$order_total_base_currency = get_post_meta(\$order_id, '_order_total_base_currency', true);

// Set a a default exchange rate, in case any of the totals is not valid.
// Here we return "1", implying that no currency conversion was performed.
\$exchange_rate = 1;

// Ensure that we are dealing with two valid values
if((\$order_total > 0) && (\$order_total_base_currency > 0)) {
// Calculate the exchange rate from the two totals
\$exchange_rate = \$order_total_base_currency / \$order_total;
}```