Skip to content

Commit 9608aa1

Browse files
author
Dave Pettypiece
committed
update v20-python to 3.0.13
1 parent 7ca98c5 commit 9608aa1

4 files changed

Lines changed: 20 additions & 14 deletions

File tree

requirements/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ pyyaml==3.11
22
tabulate==0.7.5
33
requests==2.11.1
44
ujson==1.35
5-
v20==3.0.10.0
5+
v20==3.0.13.0

src/common/view.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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

src/order/list_pending.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff 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

src/trade/get.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)