-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35ea2ee
commit f5c8966
Showing
1 changed file
with
28 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,41 @@ | ||
import parameters as params | ||
from libs.authentification import WFMarketAuth | ||
from dotenv import load_dotenv | ||
import os | ||
import libs.augment_mods as augment_mods | ||
from libs.market_items import MarketItem, MarketItems | ||
from libs.sales_strategies import SellAllAtPrice, SellMostProfitable | ||
from libs.sales_agents import ManualSales | ||
from libs.market_items import MarketItems | ||
from libs.sales_strategies import SellMostProfitable | ||
from libs.sales_agents import AutomaticSales, ManualSales | ||
|
||
|
||
if __name__ == '__main__': | ||
# load_dotenv() | ||
|
||
mods = augment_mods.get_augment_mods('Red Veil') | ||
market_items = MarketItems() | ||
market_items.add_items_from_item_names(mods) | ||
|
||
market_items.get_item_prices() | ||
|
||
# print(SellMostProfitable.propose_mods_to_sell(market_items, sell_below_current_cheapest= True)) | ||
|
||
items_to_sell = SellMostProfitable.propose_mods_to_sell(market_items, sell_below_current_cheapest= True) | ||
|
||
# print most profitable mods with price | ||
ManualSales().sell_items(items_to_sell) | ||
|
||
# TODO automate sale | ||
# automatic sell most profitable mods at best price | ||
auth = WFMarketAuth() | ||
load_dotenv() | ||
wfm_mail = os.environ.get('WFM_MAIL') | ||
wfm_password = os.environ.get('WFM_PASSWORD') | ||
if wfm_mail and wfm_password: | ||
auth.login_user(wfm_mail, wfm_password) | ||
else: | ||
print('Please set "WFM_MAIL" and "WFM_PASSWORD" in the .env file.') | ||
exit() | ||
|
||
agent = AutomaticSales(auth) | ||
agent.sell_items(items_to_sell) | ||
|
||
agent.delete_other_orders(market_items) | ||
|
||
|
||
|
||
|