Unable to close trades on some exchanges #185

Closed
opened 2020-06-25 13:25:58 -07:00 by scionaltera · 0 comments
scionaltera commented 2020-06-25 13:25:58 -07:00 (Migrated from github.com)

On Bitflyer and Poloniex Arbitrader seems to consistently try to close trades using slightly too much volume, which makes the order fail.

The problem has to do with how the exchanges compute fees. We're trying to open an order to sell off the entire cryptocurrency balance, back to zero. On most exchanges, we submit an order for the entire remaining balance, the exchange subtracts fees and processes the order. These two exchanges appear to take our requested order volume and add the fees to that amount, which pushes it over the account balance.

I have two solutions to try for this problem, in priority order:

  1. Add a configuration flag to distinguish between "fee included" and "fee added" exchanges, so we can factor that into the volume computation.
  2. Catch the exception and retry with a slightly smaller amount until it works. Messy, but a good last ditch effort that will probably work.
On Bitflyer and Poloniex Arbitrader seems to consistently try to close trades using slightly too much volume, which makes the order fail. The problem has to do with how the exchanges compute fees. We're trying to open an order to sell off the entire cryptocurrency balance, back to zero. On most exchanges, we submit an order for the entire remaining balance, the exchange subtracts fees and processes the order. These two exchanges appear to take our requested order volume and **add** the fees to that amount, which pushes it over the account balance. I have two solutions to try for this problem, in priority order: 1. Add a configuration flag to distinguish between "fee included" and "fee added" exchanges, so we can factor that into the volume computation. 1. Catch the exception and retry with a slightly smaller amount until it works. Messy, but a good last ditch effort that will probably work.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
scion/arbitrader#185
No description provided.