I need to convert amount from one currency to another currency in magento 2 not from store base currency
$priceCurrencyObject = $objectManager->get('Magento\Framework\Pricing\PriceCurrencyInterface'); //instance of PriceCurrencyInterface $store = $this->_storeManager->getStore()->getStoreId(); //get current store id if store id not get passed $rate = $priceCurrencyObject->convert($USDamount, $store, 'INR');
I tried above code it will convert base currency to another currency.
My criteria is I need to mention from currency and to currency.
Is it possible in magento2