Closed andygoossens closed 6 years ago
Hmm, interesting, yes we should definitely take this into account.
Can you please give me some examples of the exchanges/coins you have seen this fee being non-zero on?
When an exchange does not expose the deposit fees through its API, most often you can find the list of costs at the top of the ccxt class.
e.g. HitBTC (ccxt: hitbtc2.php) has:
'deposit' => array (
'BTC' => 0.0006,
'ETH' => 0.003,
...
I know that HitBTC is not yet supported and that implementing this change can be considered a low priority. But it does not hurt to mention that these kind of costs are not yet taken into account.
Pushed a number of commits to the binance branch which should fix this: https://github.com/cryptoeax/arbbot/compare/21fe01f...e6cc40f
Please test and reopen if there are any remaining issues. Thanks!
I don't have time this week to try out these changes. :-(
But it seems like we forgot to check for the deposit cost when balancing our coins: https://github.com/cryptoeax/arbbot/compare/21fe01f...e6cc40f#diff-e43e0520e5296919453b7aaf2ce9bc2bR307
But it seems like we forgot to check for the deposit cost when balancing our coins: 21fe01f...e6cc40fdiff-e43e0520e5296919453b7aaf2ce9bc2bR307
That code is specialized for BTC transfers where we have a different way of deciding when to make a transfer and pay less attention to transfer fees alone. But in general it's hard to just inject this info into our balancing algorithm because it first picks a highest exchange as the source and then chooses a target. I've been thinking about a better algorithm that would take this information into account as well, but for now all we do with the deposit fee during rebalancing is just record it. :-)
Most coins on most exchanges can be deposited for free. But there are some that have a deposit cost. Take those into account when calculating the "transfer fee".
For ccxt based exchanges this information can be found in
$this->exchange->fees[ 'funding' ][ 'deposit' ];
.It would probably be a good idea to rename the current
transferFees
field intowithdrawFees' and introduce a new
depositFees` field. When needed, look up the withdraw fee for the source exchange, add the deposit fee for the target exchange and compute the total transfer fee.