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
resolve_trades currently only works when there is exactly one Buy and one Sell op for any particular utc_time.
This leaves many cases unhandled, which could result in miscalculated gains.
Here are four such cases:
Multiple buy/sell-pairs at a particular utc_time
Orders not being fulfilled at once, leading to Buy/Sell ops later on.
Commissions / Withdrawals / Deposits / Airdrop / CoinLendInterest increasing the op count (more than 2 ops in that case)
It can happen that bnb small asset exchange happen at multiple utc_times (sell ops one second before buy ops)
The first case can be resolved for 3 coins if there is a "bridge coin" (sell btc -> usdt, buy eth -> usdt), because usdt is included in both orders.
The third case can be resolved by filtering the irrelevant ops.
Binance does provide an order history, which contains the required information to resolve trades correctly, even when multiple trades occur. Maybe that can help us.
resolve_trades
currently only works when there is exactly oneBuy
and oneSell
op for any particularutc_time
.This leaves many cases unhandled, which could result in miscalculated gains.
Here are four such cases:
utc_time
Buy
/Sell
ops later on.utc_time
s (sell ops one second before buy ops)The first case can be resolved for 3 coins if there is a "bridge coin" (sell btc -> usdt, buy eth -> usdt), because usdt is included in both orders.
The third case can be resolved by filtering the irrelevant ops.
Binance does provide an order history, which contains the required information to resolve trades correctly, even when multiple trades occur. Maybe that can help us.
pr: #136
The text was updated successfully, but these errors were encountered: