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
Cost fill_cost = cb.price * cb.quantity;
Both price and quantity have been multiplied their respective precisions to convert to int64_t:
i.e. price = 100.00 USD -> 10000, quantity 5.00 -> 500
so according to the formula fill_cost is 10000 * 500 -> 5000000 or 50000.00
which is wrong,
Correct fill_cost = 100.00 * 5.00 = 500.00
It would be better to not calculate fill_cost as there is no need for it in liquibook and save computation.
The text was updated successfully, but these errors were encountered:
In cb_order_fill callback:
Cost fill_cost = cb.price * cb.quantity;
Both price and quantity have been multiplied their respective precisions to convert to int64_t:
i.e. price = 100.00 USD -> 10000, quantity 5.00 -> 500
so according to the formula fill_cost is 10000 * 500 -> 5000000 or 50000.00
which is wrong,
Correct fill_cost = 100.00 * 5.00 = 500.00
It would be better to not calculate fill_cost as there is no need for it in liquibook and save computation.
The text was updated successfully, but these errors were encountered: