Dear members,

I frequently encounter multiple trades that gets executed for a single 
order. In India, the tradebook provided by the broker lists all the such 
trades with same date,symbol and trade price individually(refer attached). 
When i import from this tradebook, this causes too many transactions in my 
beancount file, which is not really needed.

Is there a way to merge multiple trades into one if they have same 
date,symbol and trade price. 
Is there any solution already implemented in any other importer code? I 
tried searching in this mailing list, but can't locate any thread on this.

The current importer code zerodha.py that i use can be found here 
https://github.com/prabusw/beancount-importers-india.

Any pointer or ideas to implement the same is highly appreciated.

Cheers,
Prabu

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/96f44c85-9e8c-456f-81a1-906ed63fb6c6n%40googlegroups.com.
trade_date,tradingsymbol,exchange,segment,trade_type,quantity,price,amount,fees,order_id,trade_id,order_execution_time
2019-11-26,CENTRALBK,NSE,EQ,sell,1294,22.4,28985.6,28.99,1000000006644488,2062700,2019-11-26T13:42:34
2019-11-26,CENTRALBK,NSE,EQ,sell,200,22.4,4480,4.48,1000000006644488,2062701,2019-11-26T13:42:34
2019-11-26,CENTRALBK,NSE,EQ,sell,50,22.4,1120,1.12,1000000006644488,2062702,2019-11-26T13:42:34
2019-11-26,CENTRALBK,NSE,EQ,sell,1,22.4,22.4,0.02,1000000006644488,2062703,2019-11-26T13:42:34
2019-11-26,CENTRALBK,NSE,EQ,sell,39,22.4,873.6,0.87,1000000006644488,2062704,2019-11-26T13:42:34
2019-11-26,CENTRALBK,NSE,EQ,sell,500,22.4,11200,11.2,1000000006644488,2062705,2019-11-26T13:42:34
2019-11-26,CENTRALBK,NSE,EQ,sell,25,22.4,560,0.56,1000000006644488,2062706,2019-11-26T13:42:34
2019-11-26,CENTRALBK,NSE,EQ,sell,100,22.4,2240,2.24,1000000006644488,2062707,2019-11-26T13:42:34
2019-11-26,CENTRALBK,NSE,EQ,sell,50,22.4,1120,1.12,1000000006644488,2062708,2019-11-26T13:42:34
2019-11-26,CENTRALBK,NSE,EQ,sell,1,22.4,22.4,0.02,1000000006644488,2062709,2019-11-26T13:42:34
2019-11-26,CENTRALBK,NSE,EQ,sell,400,22.4,8960,8.96,1000000006644488,2062710,2019-11-26T13:42:34
2019-11-26,CENTRALBK,NSE,EQ,sell,3,22.4,67.2,0.07,1000000006644488,2065430,2019-11-26T13:43:03

Reply via email to