EWrapperMsgGenerator in IBAPI Java

Discussion in 'Interactive Brokers' started by lime, Jun 19, 2024.

  1. lime

    lime

  2. 2rosy

    2rosy

    looks like it just returns String from static functions. More utility than anything. I dont see it used anywhere other than samples and tests
     
    lime likes this.
  3. lime

    lime

    I see it used in reading data from reqHistoricalData(),

    Code:
    @Override
    public void historicalData(int reqId, Bar bar) {
    	System.out.println("HistoricalData:  " + EWrapperMsgGenerator.historicalData(reqId, bar.time(), bar.open(), bar.high(), bar.low(), bar.close(), bar.volume(), bar.count(), bar.wap()));
    	}
    
    It seems used to read data received for that receiver function, so EWrapperMsgGenerator.nextValidId(id) for next Id returned
     
  4. It works as a text formatting tool for printing callback replies to terminal, in case you're too lazy to do your own formatting. To be honest: I have never used it in my own software.
     
    lime likes this.
  5. lime

    lime

    Your right, I saw it being used in the sample codes and some Github codes, but the return parameters can just be read directly. That is such a useless static method.