catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

order_target_value crashes on small deltas

Open avolution opened this issue 7 years ago • 1 comments

When a position already exists and the delta between existing position and and the new value is too small you will get an

catalyst.exchange.exchange_errors.CreateOrderError: Unable to create order on exchange bitfinex bitfinex {"message":"Invalid order: minimum size for BTC/USD is 0.002"}.

In my opinion the function should not submit an order when the amount is below the exchange limit otherwise i have to implement my own "min order amount handling" what makes these function complete useless, cause then I have to reimplement the complete delta logic.

The same applies to catalyst.api.order_target_percent.

An idea would be a special parameter(for example: ignore_small_deltas, delta_threshold etc.) or a special exception type.

avolution avatar Jul 23 '18 15:07 avolution

Thanks @avolution for bringing this up. We will look at it.

lenak25 avatar Jul 31 '18 10:07 lenak25