Browse Source

market: ignore filled CXOS

don't show undercut/outbid for filled orders
raylu 2 tuần trước cách đây
mục cha
commit
442c8d25dd
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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 summary in cache.get('https://rest.fnar.net/exchange/all')
 	}
 	}
 	for order in orders:
 	for order in orders:
+		if order['Status'] == 'FILLED':
+			continue
 		state = summary[order['MaterialTicker'], order['ExchangeCode']]
 		state = summary[order['MaterialTicker'], order['ExchangeCode']]
 		if order['OrderType'] == 'BUYING' and state['Bid'] is not None and state['Bid'] > order['Limit']:
 		if order['OrderType'] == 'BUYING' and state['Bid'] is not None and state['Bid'] > order['Limit']:
 			print('outbid on', f'{order["MaterialTicker"]}.{order["ExchangeCode"]}')
 			print('outbid on', f'{order["MaterialTicker"]}.{order["ExchangeCode"]}')