timmolter/XChange — pull request #734 by mmazi (2014-10-31 10:53:33+00:00)
Title: Trade subclass

This is a continuation of #727. Two new classes, UserTrade and UserTrades, are introduced and used.

Note that this does not break compilation of normal usage, but might break some more obscure use cases like where the user called one of the `Trade` constructors explicitly (though I can't think of a good reason why someone would do this).

Also note that while I put several hours of work into this, I still think it might be a good idea _not_ to merge this since it introduces some problems that such hierarchies necessary bring, doesn't really provide anything useful to the user except that it solves a single trivial problem, namely that public Trade data currently always contain redundant fee and orderId fields with null values.

(Even if the whole pull request isn't merged, commit 1f2b6bd6d8314fd6eb0d01239e0e6a381884e01b should still be cherry-picked and adapted since it adds fees for two exchanges.)

Also note that the `Trade` and `Trades` classes were left in the `marketdata` package. They can easily be moved, but this would total break compile-time backwards compatibility for all user who call `PollingTradeService#getTradeHistory`. Since this is a very easy (and dangerous) task, I'm leaving this to someone braver than me :)