-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve ops in edge cases #136
base: main
Are you sure you want to change the base?
Conversation
I merged the two methods for resolving fees and trades into one. I am not sure how to account for fees paid in bnb when there is more than one buy op... I added a |
Make sure that resolving fees and resolving trades can be something different. E.g. the fee could also belong to a deposit
Split the BNB fee according to the "value" of the sell. We can use the price in eur to estimate that |
True. Maybe have fees done in multiple passes? What do you prefer / think is better?
Like calculating the expected fee and find a combination of fee ops matches the calculated fee best? Fees can be quite different depending on volume on Binance. Don't know about other platforms. |
Matching of deposit/withdrawals, coin lend/staking start and end, trading pairs and finally matching everything with fees should be possible in the same loop In that case we might have to group and match everything before the "merge of equal operations" |
Im am first going to concentrate on trades with fees. We can add lending/staking, etc. later. |
Hey @jhoogstraat, I went through the code and did some formatting. Didn't wanted to bother you with that. I merged the newest main into the branch, fixed the linting errors and added some more assert checks. Changes look good to me. I'd love when you could proof read my commits. Is the PR ready to be merged? Looking forward to your reply. For now, I'll mark this as draft to keep an overview. :) |
This is the pr for issue #135.
It's not finished yet, but I wanted to allow for feedback early on.
Implemented edge cases:
utc_time
via a bridge coinutc_time
s (buy/sell 1 second apart for me)double_buy_sell_pair
caseCurrently, the
is_binance_bnb_small_asset_transfer
case catches almost everything that was not handled by the other cases.I tried my best to make sure that only ops that really are small asset exchanges get handled (assert that the buy coin is BNB).