Selaa lähdekoodia

market: only show HRT warehouse

raylu 2 viikkoa sitten
vanhempi
sitoutus
d4c0f31812
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      market.py

+ 3 - 0
market.py

@@ -63,6 +63,8 @@ def check_warehouses() -> None:
 			headers={'Authorization': config.fio_rest_key})
 	now = datetime.datetime.now(datetime.UTC)
 	for warehouse in warehouses:
+		if warehouse['LocationNaturalId'] != 'HRT':
+			continue
 		storage: Storage = cache.get(f'https://rest.fnar.net/storage/{config.username}/{warehouse["StoreId"]}',
 			headers={'Authorization': config.fio_rest_key})
 		for item in storage['StorageItems']:
@@ -78,6 +80,7 @@ def check_warehouses() -> None:
 					if now - dt > datetime.timedelta(days=7):
 						break
 					print(f'  {dt} {trade["PartnerName"]} {trade["Amount"]} @ {trade["Price"]}')
+		break
 
 def analyze_markets(raw_prices: typing.Sequence[RawPrice]) -> typing.Iterator[MarketHealth]:
 	'''score IC1 based on how much better the other CXes are'''