Переглянути джерело

market: ignore filled CXOS

don't show undercut/outbid for filled orders
raylu 2 тижнів тому
батько
коміт
442c8d25dd
1 змінених файлів з 2 додано та 0 видалено
  1. 2 0
      market.py

+ 2 - 0
market.py

@@ -55,6 +55,8 @@ def check_cxos() -> None:
 		for summary in cache.get('https://rest.fnar.net/exchange/all')
 	}
 	for order in orders:
+		if order['Status'] == 'FILLED':
+			continue
 		state = summary[order['MaterialTicker'], order['ExchangeCode']]
 		if order['OrderType'] == 'BUYING' and state['Bid'] is not None and state['Bid'] > order['Limit']:
 			print('outbid on', f'{order["MaterialTicker"]}.{order["ExchangeCode"]}')