code: def _generate_signature(self, nonce, method, path, data):
          
  
          data_json = ""
          endpoint = path
          if method == "get":
              if data:
                  query_string = self._get_params_for_sig(data)
                  endpoint = "{}?{}".format(path, query_string)
          elif data:
              data_json = compact_json_dict(data)
          sig_str = ("{}{}{}{}".format(nonce, method.upper(), endpoint, data_json)).encode('utf-8')
          m = hmac.new(self.API_SECRET.encode('utf-8'), sig_str, hashlib.sha256)
          return base64.b64encode(m.digest())
docs: Generate the call signature
  
          :param path:
          :param data:
          :param nonce:
  
          :return: signature string