code: def to_satoshis(input_quantity, input_type):
      ''' convert to satoshis, no rounding '''
      assert input_type in UNIT_CHOICES, input_type
  
      # convert to satoshis
      if input_type in ('btc', 'mbtc', 'bit'):
          satoshis = float(input_quantity) * float(UNIT_MAPPINGS[input_type]['satoshis_per'])
      elif input_type == 'satoshi':
          satoshis = input_quantity
      else:
          raise Exception('Invalid Unit Choice: %s' % input_type)
  
      return int(satoshisf to_satoshis(input_quantity, input_type):
      ''' convert to satoshis, no rounding '''
      assert input_type in UNIT_CHOICES, input_type
  
      # convert to satoshis
      if input_type in ('btc', 'mbtc', 'bit'):
          satoshis = float(input_quantity) * float(UNIT_MAPPINGS[input_type]['satoshis_per'])
      elif input_type == 'satoshi':
          satoshis = input_quantity
      else:
          raise Exception('Invalid Unit Choice: %s' % input_type)
  
      return int(satoshis)
docs: convert to satoshis, no rounding