In order to retrieve version of any extension/module in Magento 2, you can use following code snippet.

Here, Wallet is vendor name and Version is module name. Enjoy cool stuff! Enjoy Magento 2!! Enjoy Magewallet!!!