File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ pyyaml==3.11
22tabulate==0.7.5
33requests==2.11.1
44ujson==1.35
5- v20==3.0.10 .0
5+ v20==3.0.13 .0
Original file line number Diff line number Diff line change @@ -122,10 +122,8 @@ def print_response_entity(
122122 """
123123
124124 try :
125- print_entity (
126- response .get (transaction_name , expected_status ),
127- title = title
128- )
125+ transaction = response .get (transaction_name , expected_status )
126+ print_entity (transaction , title = title )
129127 print ("" )
130128 except :
131129 pass
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def main():
1818 )
1919
2020 parser .add_argument (
21- "--details " ,
21+ "--verbose" , "-v " ,
2222 dest = "summary" ,
2323 help = "Print details of the orders" ,
2424 action = "store_false"
@@ -40,11 +40,15 @@ def main():
4040
4141 orders = sorted (orders , key = lambda o : int (o .id ))
4242
43- if args .summary :
44- print_orders (orders )
45- else :
46- for order in orders :
47- print (order )
43+ if not args .summary :
44+ print ("-" * 80 )
45+
46+ for order in orders :
47+ if args .summary :
48+ print (order .title ())
49+ else :
50+ print (order .yaml (True ))
51+ print ("-" * 80 )
4852
4953
5054
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ def main():
4141 )
4242
4343 parser .add_argument (
44- "--details " , "-d " ,
44+ "--verbose " , "-v " ,
4545 dest = "summary" ,
4646 help = "Print Trade details instead of summary" ,
4747 action = "store_false"
@@ -63,11 +63,15 @@ def main():
6363 if args .all :
6464 response = api .trade .list_open (account_id )
6565
66+ if not args .summary :
67+ print ("-" * 80 )
68+
6669 for trade in reversed (response .get ("trades" , 200 )):
6770 if args .summary :
6871 print (trade .title ())
6972 else :
70- print (trade )
73+ print (trade .yaml (True ))
74+ print ("-" * 80 )
7175
7276 return
7377
@@ -79,7 +83,7 @@ def main():
7983 if args .summary :
8084 print (trade .title ())
8185 else :
82- print (trade )
86+ print (trade . yaml ( True ) )
8387
8488 return
8589
You can’t perform that action at this time.
0 commit comments