docs: function addSignature(key, secret, uri, body, options) {
      if (!_.isString(key) || !_.isString(secret)) {
          throw new errors.AuthenticationRequiredError("key and secret must be provided for signing requests");
      }
      options = options || {};
  
      // remove signature if it exists in URI object
      uri.removeSearch("signature");
  
      // add api key
      uri.removeSearch("apikey");
      uri.addQuery("apikey", key);
  
      // create a valid baseurl
      // consider that some users might be sitting behind a proxy
      var signatureBase;
      var baseurl = options.apiVersion === 3 ?
          utils.setup().baseurlv3 :
          utils.setup().baseurl;
      baseurl = trim(baseurl, "/");
      var url = uri.toString();
      url = trim(url.substring(0, url.indexOf("?")), "/");
      if (url.search(baseurl) !== -1) {
          baseurl = url;
      } else {
          baseurl += "/" + uri.segment().join("/");
      }
      signatureBase = encodeURIComponent(trim(baseurl, "/"));
  
      // append a "?" - preparing for parameter string
      signatureBase += "?";
  
      // create the parameter string
      var params = uri.search(true);
      var paramsKeys = utils.sortKeys(params);
      var parameterString = "";
      paramsKeys.forEach(function(paramKey) {
          if (parameterString !== "") {
              parameterString += "&";
          }
          parameterString += encodeURIComponent(paramKey) + "=" + encodeURIComponent(params[paramKey]);
      });
  
      // concatenating the parameter string
      signatureBase += parameterString;
  
      // concatenating the request body, if available
      if (body) {
          if (typeof body !== "string") {
              body = JSON.stringify(body);
          }
          signatureBase += encodeURIComponent(body);
      }
  
      // creating a hash
      var hmac = crypto.createHmac("sha256", secret);
      hmac.update(signatureBase);
      var hash = hmac.digest("hex");
  
      // add hash to original uri object
      uri.addQuery("signature", hash);
  
      return uri;
  }