You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
So in my case of trading EOS, with 0.0089 BTC. I place a buy order in for 8 EOS at a rate of 0.00107725. Zenbot computes order.size as 8.32426980 because of the maker fee inflation in that first calculation. When I'm cancelling the order, it's saying currency - currency_hold > price * remaining_size which looks like 0.0089 - 0 < 0.00107725 * 8.32426980 => 0.0089 < 0.008967319642.
This incorrectly tells Zenbot you have funds held, when the calculation SHOULD read: 0.0089 - 0 < 0.00107725 * 8 => 0.0089 < 0.008618 because 8 is the ACTUAL size in that order.
So now even though I have no active orders, and my balance looks like: {"asset":0,"currency":0.0089,"currency_hold":0,"asset_hold":0}, it thinks I have currency held. Then it spits out funds on hold after cancel, waiting 5s forever until I restart Zenbot.
I know it's trying to take into account the fact that you may have multiple orders... but why doesn't the calculation just say on_hold = s.balance.currency_hold > 0?
The text was updated successfully, but these errors were encountered:
// Change this:
if (on_hold) {
// wait a bit for settlement
msg('funds on hold after cancel, waiting 5s')
setTimeout(checkHold, c.wait_for_settlement)
}
else {
cb(null, do_reorder ? null : false)
}
// To this:
if (on_hold && s.balance.currency_hold > 0) {
order.size
is calculated like this:Then later on in
cancelOrder
, you have:So in my case of trading EOS, with 0.0089 BTC. I place a buy order in for 8 EOS at a rate of 0.00107725. Zenbot computes
order.size
as8.32426980
because of the maker fee inflation in that first calculation. When I'm cancelling the order, it's sayingcurrency - currency_hold > price * remaining_size
which looks like0.0089 - 0 < 0.00107725 * 8.32426980 => 0.0089 < 0.008967319642
.This incorrectly tells Zenbot you have funds held, when the calculation SHOULD read:
0.0089 - 0 < 0.00107725 * 8 => 0.0089 < 0.008618
because 8 is the ACTUAL size in that order.So now even though I have no active orders, and my balance looks like:
{"asset":0,"currency":0.0089,"currency_hold":0,"asset_hold":0}
, it thinks I have currency held. Then it spits outfunds on hold after cancel, waiting 5s
forever until I restart Zenbot.I know it's trying to take into account the fact that you may have multiple orders... but why doesn't the calculation just say
on_hold = s.balance.currency_hold > 0
?The text was updated successfully, but these errors were encountered: