code: function TradingWrapper(apiKeyOrParams, apiSecret, nonceGen) {
      // Assume first parameter (i.e. apiKeyOrParams) is a params package
      let params = apiKeyOrParams;
  
      // Try to prove this assumption wrong
      if (params === null || typeof params !== "object") {
          // Pack parameters if so
          params = {
              apiKey: apiKeyOrParams,
              apiSecret: apiSecret,
              nonceGen: nonceGen
          };
      }
  
      // Assert parameter expectations
      ParamUtils.expectParams(params, {
          apiKey: "string",
          apiSecret: "string",
          nonceGen: {type: "function", opt: true}
      });
  
      this._apiKey = params.apiKey;
      this._apiSecret = params.apiSecret;
      this._nonceGen = params.nonceGen;
  }
docs: /*
  Trading API wrapper constructor.