timmolter/XChange — pull request #319 by tbosman (2014-02-19 13:03:52+00:00)
Title: added orderstatus method and acces to margin trading bitfinex

Implements the orderstatus api method. I added a boolean onMargin to the raw tradeservice at bitfinex, the generic one still uses exchange by default. I want to add all the margin trading facilities to the generic interface to but i'm not sure what the prefered implementation for this is.

My thought was the simplest way to do this is add a flag to the BitfinexTradeService class that specifies if orders should be sent to the exchange or the margin trading facility.

In the long run though might it be an idea to add an optional order parameter object to the placeLimitOrder method? This would also enable acces to advanced orders like stop loss, fill or kill etc. through the generic service object. Do you like this or should these features be left to the raw service?

Also, i will be needing access to the active position methods for my bot, but currently there's not DTO for that. Do you want this added to the core package seeing that Bitfinex is currently the only exchange offering margin trading access through there api?

Lastly i changed the compareTo method of Trade to compare on timestamp first. I didn't know how to exclude commits from my pull request so please remove it if you don't agree.