-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Currently fee may be paid in buy_currency or sell_currency. I'm analyzing data from Bitshares decentralized exchange, and there are several types of fees. One of them is a fee for each transaction performed, and this fee may be paid in any asset.
Here is a withdrawal example where fee was paid in BTS core asset:
Kind,Date,Buy currency,Buy amount,Sell currency,Sell amount,Fee currency,Fee amount,Exchange,Mark,Comment
Withdrawal,2017-12-19T23:21:09,,0,STRANGE,185.0,BTS,0.21851,Bitshares,-1,1.11.105563860
To handle such situation probably an additional check into BagQueue.process_trade() may be added: if fee_currency != buy/sell currency THEN make virtual Trade object and recursively pass it into process_trade(). Similar check in Trade() which raises an exception may be changed to simply set self.feeval = 0.
leftys
Metadata
Metadata
Assignees
Labels
No labels