code: def GET_prices_namespace( self, path_info, namespace_id ):
          
          if not check_namespace(namespace_id):
              return self._reply_json({'error': 'Invalid namespace'}, status_code=400)
  
          blockstackd_url = get_blockstackd_url()
          price_info = blockstackd_client.get_namespace_cost(namespace_id, hostport=blockstackd_url)
          if json_is_error(price_info):
              # error
              status_code = price_info.get('http_status', 502)
              return self._reply_json({'error': price_info['error']}, status_code=status_code)
  
          ret = {
              'amount': str(price_info['amount']),        # helps JS clients that can't parse big ints
              'units': price_info['units'],
          }
  
          if ret['units'] == 'BTC':
              # v1 compat
              ret['satoshis'] = price_info['amount']
  
          return self._reply_json(ret)
docs: Get the price for a namespace
          Reply the price for the namespace as {'units': "...", 'amount': "..."}
          Reply 502 if we can't reach the namespace for whatever reason