I need to currency rate by currency code in magento 2.
$currency = $objectManager->get('Magento\Framework\Pricing\PriceCurrencyInterface'); $currencySymbol = $currency->getRate('USD');
I tried above code it returns fatal error.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
I reckon you should use
Magento\Directory\Model\Currency class instead of
On top of that, I suggest you never use the object manager directly and use dependency injection instead.