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
Hi
I'm trying to take orders (both a buys orders and sells orders), following the taker.js example
the problem I have is with the amount parameter.
The example is doing the following things
should I always use ethAvailableVolumeBase both for buys and sells?
fraction would obviously be a floating point and so would be amount, but amount should always be in amountGet terms which is in wei and so don't need to be a floating point, is it correct and safe to do
Hi
I'm trying to take orders (both a buys orders and sells orders), following the taker.js example
the problem I have is with the amount parameter.
The example is doing the following things
I have the following questions:
should I always use ethAvailableVolumeBase both for buys and sells?
fraction would obviously be a floating point and so would be amount, but amount should always be in amountGet terms which is in wei and so don't need to be a floating point, is it correct and safe to do
amount = amount.toNumber();
to truncate decimals?
the amount should be written as something like
const amount = (order.amountGet - order.amountFilled).times(new BigNumber(String(fraction)));
because otherwise you could potentially trying to get more quantity than the available one, is this reasoning correct?
The text was updated successfully, but these errors were encountered: