Esempio n. 1
0
)
_section_market.addEntry(
    "MAX_CONNECTIONS", 30,
    "The maximum number of simultaneous threads for http-requests")
_section_market.addEntry(
    "MAX_ORDER_AGE", 4,
    "Only include orders of players that are either in-game, or that have been updated in the last X hours"
)
_section_market.addEntry(
    "MAX_UPDATE_AGE", 8,
    "The local market data (the prices) gets updated after this amount of hours"
)
_section_market.addEntry("RELIC_ITEMS_ONLY", True,
                         "Only download prices for relic rewards")

_config.build()
_config.loadAndUpdate(constants.CONFIG_LOC + "warframemarket.cfg")

_loaded = False
_item_data = {}
_market_data = {}


def _update_prices():
    """
    Requires existing and valid _item_data
    """
    print("[WFMarket] updating. This may take a while.")
    order_address = "https://api.warframe.market/v1/items/{}/orders"

    market_data = _create_empty_market_data(_item_data)
Esempio n. 2
0
        return None
    
    if order_type == "buy":
        price_repr = calc_buy_repr(comp_prices)
    else:
        price_repr = calc_sell_repr(comp_prices)

    if price_repr is None:
        return None

    comp_repr += price_repr
return comp_repr''', "prices, order_type"),
    "calculates a buy-price-representative for a set of components from price-data"
)

config.build()
config.loadAndUpdate(os.path.join(constants.CONFIG_LOC, "markethelper.cfg"))
instance.setConfig(config)

if __name__ == "__main__":
    # load (and possibly update) warframe market
    from core import wfmarket_v2
    wfmarket_v2.load()

    from PyQt5.QtWidgets import QApplication
    from market.app import Window


def excepthook(excType, excValue, tracebackobj):
    """
    Global function to catch unhandled exceptions.