market ====== .. py:module:: sidequest_common.schemas.market .. autoapi-nested-parse:: The guild market report: what to gather and what to craft for gold, from one auction house's sale data. The numbers come from a feed (``POST /api/market/feed``) that a price tracker sends for the guild's auction house: each item's current price, what it really sold for and how many sell a day, plus the recipes that use them. The site turns that feed into a daily and a weekly report, shown to guild members on the site and posted once a day by the bot. The report only covers raw materials and crafted goods; it never names single listings or resale deals. Money is copper (an ``int``). .. py:data:: MARKET_FEED_DAYS :value: 30 Days of daily prices the feed carries for each item. .. py:data:: MARKET_STALE_HOURS :value: 36 the bot skips the day's report and the site says so. :type: A feed older than this is too old to post .. py:data:: MARKET_AH_CUT :value: 0.05 The auction house's cut of a sale at a faction house. .. py:data:: MarketReportKind .. py:class:: MarketFeedDay Bases: :py:obj:`pydantic.BaseModel` One day of an item's prices in the feed. .. py:attribute:: day :type: datetime.date .. py:attribute:: min_price :type: int .. py:attribute:: market :type: int .. py:class:: MarketFeedItem Bases: :py:obj:`pydantic.BaseModel` One item's current numbers in the feed. .. py:attribute:: item_id :type: int .. py:attribute:: name :type: str .. py:attribute:: quality :type: str | None .. py:attribute:: stack_size :type: int .. py:attribute:: vendor_buy :type: int .. py:attribute:: vendor_sell :type: int .. py:attribute:: min_price :type: int .. py:attribute:: quantity :type: int .. py:attribute:: market :type: int .. py:attribute:: sale_price :type: int .. py:attribute:: sold_per_day :type: float .. py:attribute:: days :type: list[MarketFeedDay] .. py:class:: MarketFeedReagent Bases: :py:obj:`pydantic.BaseModel` One reagent of a recipe in the feed. .. py:attribute:: item_id :type: int .. py:attribute:: quantity :type: int .. py:class:: MarketFeedRecipe Bases: :py:obj:`pydantic.BaseModel` One recipe in the feed: what it makes and what it uses. .. py:attribute:: recipe_id :type: int .. py:attribute:: name :type: str .. py:attribute:: profession :type: str .. py:attribute:: crafted_item_id :type: int .. py:attribute:: crafted_quantity :type: float .. py:attribute:: reagents :type: list[MarketFeedReagent] .. py:class:: MarketFeed Bases: :py:obj:`pydantic.BaseModel` ``POST /api/market/feed``: one auction house's numbers. Replaces the previous feed for that house. .. py:attribute:: house_id :type: int .. py:attribute:: house_name :type: str .. py:attribute:: snapshot_at :type: datetime.datetime .. py:attribute:: items :type: list[MarketFeedItem] .. py:attribute:: recipes :type: list[MarketFeedRecipe] .. py:class:: MarketFeedReceipt Bases: :py:obj:`pydantic.BaseModel` What the site stored from a feed. .. py:attribute:: items :type: int .. py:attribute:: recipes :type: int .. py:class:: MarketItemRef Bases: :py:obj:`pydantic.BaseModel` An item named in the report. .. py:attribute:: item_id :type: int .. py:attribute:: name :type: str .. py:attribute:: quality :type: str | None .. py:class:: MarketPoint Bases: :py:obj:`pydantic.BaseModel` One day of an item's price, for a small chart. .. py:attribute:: day :type: datetime.date .. py:attribute:: price :type: int .. py:class:: MarketZone Bases: :py:obj:`pydantic.BaseModel` A zone where a material can be gathered. .. py:attribute:: name :type: str .. py:attribute:: min_level :type: int .. py:attribute:: max_level :type: int .. py:class:: MarketGatherPick Bases: :py:obj:`pydantic.BaseModel` A material worth gathering: what it sells for, how fast it sells, and where to get it. .. py:attribute:: item :type: MarketItemRef .. py:attribute:: price :type: int .. py:attribute:: stack_size :type: int .. py:attribute:: stack_price :type: int .. py:attribute:: sold_per_day :type: float .. py:attribute:: change_pct :type: float | None .. py:attribute:: skill :type: int .. py:attribute:: min_level :type: int .. py:attribute:: max_level :type: int .. py:attribute:: zones :type: list[MarketZone] .. py:attribute:: trend :type: list[MarketPoint] .. py:class:: MarketGatherSection Bases: :py:obj:`pydantic.BaseModel` The best materials for one gathering profession. .. py:attribute:: profession :type: str .. py:attribute:: picks :type: list[MarketGatherPick] .. py:class:: MarketReagentLine Bases: :py:obj:`pydantic.BaseModel` One reagent of a craft, with its cost. .. py:attribute:: item :type: MarketItemRef .. py:attribute:: quantity :type: int .. py:attribute:: unit_price :type: int .. py:attribute:: from_vendor :type: bool .. py:class:: MarketCraftPick Bases: :py:obj:`pydantic.BaseModel` A craft worth making: what it sells for, what its materials cost, and how fast it sells. .. py:attribute:: recipe_id :type: int .. py:attribute:: recipe_name :type: str .. py:attribute:: item :type: MarketItemRef .. py:attribute:: makes :type: float .. py:attribute:: price :type: int .. py:attribute:: mats_cost :type: int .. py:attribute:: profit :type: int .. py:attribute:: margin_pct :type: float .. py:attribute:: sold_per_day :type: float .. py:attribute:: change_pct :type: float | None .. py:attribute:: cooldown_hours :type: float | None .. py:attribute:: reagents :type: list[MarketReagentLine] .. py:attribute:: trend :type: list[MarketPoint] .. py:class:: MarketCraftSection Bases: :py:obj:`pydantic.BaseModel` The best crafts for one crafting profession. .. py:attribute:: profession :type: str .. py:attribute:: picks :type: list[MarketCraftPick] .. py:class:: MarketMover Bases: :py:obj:`pydantic.BaseModel` A material or craft whose price moved a lot. .. py:attribute:: item :type: MarketItemRef .. py:attribute:: price :type: int .. py:attribute:: change_pct :type: float .. py:attribute:: profession :type: str .. py:class:: MarketReport Bases: :py:obj:`pydantic.BaseModel` ``GET /api/market/report``: what to gather and craft for gold on the guild's auction house. .. py:attribute:: kind :type: MarketReportKind .. py:attribute:: house_name :type: str .. py:attribute:: data_at :type: datetime.datetime .. py:attribute:: stale :type: bool .. py:attribute:: period_start :type: datetime.date .. py:attribute:: period_end :type: datetime.date .. py:attribute:: gathering :type: list[MarketGatherSection] .. py:attribute:: crafting :type: list[MarketCraftSection] .. py:attribute:: risers :type: list[MarketMover] .. py:attribute:: fallers :type: list[MarketMover]