|
|
@@ -40,7 +40,11 @@ def main() -> None:
|
|
|
print('mat want bids have buy savings')
|
|
|
for m in materials:
|
|
|
buy = max(m.amount - m.bids - m.have, 0)
|
|
|
- print(f'{m.ticker:4} {m.amount:>5} {m.bids:>5} {m.have:>5} {buy:>5} {m.savings:8.0f}')
|
|
|
+ if m.bids == 0 and buy > 0:
|
|
|
+ bids = f'\033[91m{m.bids:5}\033[0m'
|
|
|
+ else:
|
|
|
+ bids = str(m.bids).rjust(5)
|
|
|
+ print(f'{m.ticker:4} {m.amount:>5} {bids} {m.have:>5} {buy:>5} {m.savings:8.0f}')
|
|
|
|
|
|
# deposits of current bids
|
|
|
orders.sort(key=lambda order: order['Limit'] * order['Amount'], reverse=True)
|