File tree 2 files changed +7
-1
lines changed 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ if not os.path.exists(acn):
31
31
32
32
lines = JRRsupport .ReadFile (acn ).strip ().split ('\n ' )
33
33
34
+ fees = {}
34
35
cnr = {}
35
36
Wallet = {}
36
37
@@ -66,6 +67,9 @@ for line in lines:
66
67
if data ['Asset' ] not in Wallet :
67
68
Wallet [data ['Asset' ]]= []
68
69
70
+ if data ['Asset' ] not in fees :
71
+ fees [data ['Asset' ]]= 0
72
+
69
73
if act == 'B' :
70
74
if bw != 0 :
71
75
cnr [data ['Asset' ]]-= abs (p * a )
@@ -74,14 +78,16 @@ for line in lines:
74
78
elif act == 'S' :
75
79
cnr [data ['Asset' ]]+= abs (p * a )
76
80
81
+ fees [data ['Asset' ]]+= f
82
+
77
83
str = f"{ dt } { act } { bw :14.8f} { qw :14.8f} { a :14.8f} { p :.8f} { f :.8f} { cnr [data ['Asset' ]]:14.8f} "
78
84
Wallet [data ['Asset' ]].append (str )
79
85
80
86
for pair in sorted (Wallet .keys ()):
81
87
if len (sys .argv )> 2 and sys .argv [2 ]!= pair :
82
88
continue
83
89
84
- print (f"{ pair } :" )
90
+ print (f"{ pair } : { fees [ pair ]:.8f } paid in fees " )
85
91
for l in Wallet [pair ]:
86
92
print (f" { l } " )
87
93
print ()
You can’t perform that action at this time.
0 commit comments