|
|
@@ -49,6 +49,8 @@ def check_cxos() -> None:
|
|
|
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']:
|
|
|
+ if item['MaterialTicker'] is None:
|
|
|
+ continue
|
|
|
threshold = config.market.mm_items.get(item['MaterialTicker'])
|
|
|
if threshold is not None and item['MaterialAmount'] > threshold:
|
|
|
print(f'{item["MaterialAmount"] - threshold} {item["MaterialTicker"]} at {warehouse["LocationNaturalId"]}')
|
|
|
@@ -135,8 +137,8 @@ def format_td(td: datetime.timedelta) -> str:
|
|
|
class ExchangeOrder(typing.TypedDict):
|
|
|
MaterialTicker: str
|
|
|
ExchangeCode: str
|
|
|
- OrderType: typing.Literal['SELLING'] | typing.Literal['BUYING']
|
|
|
- Status: typing.Literal['FILLED'] | typing.Literal['PARTIALLY_FILLED'] | typing.Literal['FILLED']
|
|
|
+ OrderType: typing.Literal['SELLING', 'BUYING']
|
|
|
+ Status: typing.Literal['FILLED', 'PARTIALLY_FILLED']
|
|
|
Amount: int
|
|
|
Limit: float
|
|
|
|
|
|
@@ -173,7 +175,7 @@ class RawPrice(typing.TypedDict):
|
|
|
AverageTraded7D: float | None # averaged daily traded volume over last 7 days
|
|
|
|
|
|
class PriceChartPoint(typing.TypedDict):
|
|
|
- Interval: typing.Literal['MINUTE_FIVE'] | typing.Literal['MINUTE_FIFTEEN'] | typing.Literal['MINUTE_THIRTY'] | typing.Literal['HOUR_ONE'] | typing.Literal['HOUR_TWO'] | typing.Literal['HOUR_FOUR'] | typing.Literal['HOUR_SIX'] | typing.Literal['HOUR_TWELVE'] | typing.Literal['DAY_ONE'] | typing.Literal['DAY_THREE']
|
|
|
+ Interval: typing.Literal['MINUTE_FIVE', 'MINUTE_FIFTEEN', 'MINUTE_THIRTY', 'HOUR_ONE', 'HOUR_TWO', 'HOUR_FOUR', 'HOUR_SIX', 'HOUR_TWELVE', 'DAY_ONE', 'DAY_THREE']
|
|
|
DateEpochMs: int
|
|
|
High: float
|
|
|
Low: float
|