> > Doing some code mods I found this tidbit that has me confused, I think > it is a bug: > > In Trader.error() the handler for error code 317 assumes that the ID > passed is the ID of a strategy. This error, I believe, is in response > to a request for market depth, which is passed a ticker number for the > ID. These may not be the same, for instance, if multiple strategies > are trading the same instrument. > >
You may be right about this. This code was written some time ago, and I don't remember the semantics of the parameter "id" in the error(int id, int errorCode, String errorMsg) callback. I'll take a look at it and get back to you. My first thought is that it works as it should, because otherwise we would see a lot of NullPointerException on the line: traderAssistant.getStrategy(id).getMarketBook().getMarketDepth().reset(); However, your understanding is correct in that error(int id, ...) is called back with the id that matches the one in the call socket.reqMktDepth(int id, ...), so I'll investigate. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JBookTrader" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jbooktrader?hl=en -~----------~----~----~----~------~----~------~--~---
