Ascendex average price vs order price

AscendEx provides CSV files in the following format on request

accountCategory,clOrderId,sendingTime,lastExecutionTime,orderType,symbol,side,orderStatus,orderPrice,orderQty,filledQty,avgPrice,commission

However koinly calculates the buy price as filledQtyorderPrice which is not correct. Instead filledQtyavgPrice which gives the actual execution price. For example if I have ONLY the two rows below

symbol,side,orderPrice,filledQty,avgPrice,commission
ETH/USDT,Sell,987.17,0.995,1096.69,1.0912
AKT/USDT,Buy,0.97,1114,0.88,1.9742

you can see that after row 1 the USDT balance is (1096.690.995)1091.2 if you use the avgPrice which is consistent with the (11140.88)987.1 needed to buy AKT in ROW2. However if you use orderPrice we get a balance of USDT 982.23 after selling ETH in row 1, which is less than the (0.97*1114) 1080.58 needed to purchase AKT in row 2.

I switched data in the orderPrice and AvgPrice fields for better results, just need to confirm if I am doing the right thing.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.