Do we have any specific reason to create own currency convert? Can we do
if ($baseCurrency!=$fieldMap['currency']['magento']) {
 $data[$fieldMap["total"]["api"]] =  $quote->getBaseTotalAmount();
....
}