market ====== .. py:module:: sidequest_common.models.market .. autoapi-nested-parse:: The guild market report's stored feed: one auction house's item numbers and the recipes that use them. A price tracker posts the whole feed for a house (``POST /api/market/feed``); the site replaces that house's ``MarketItem`` and ``MarketRecipe`` rows in one transaction and stamps ``MarketFeedState``. The report is computed from these rows on request, so nothing here is per member. .. py:class:: MarketFeedState Bases: :py:obj:`advanced_alchemy.base.UUIDAuditBase` When a house's feed last arrived, and when its auction house data was taken. .. py:attribute:: house_id :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: house_name :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: snapshot_at :type: sqlalchemy.orm.Mapped[datetime.datetime] .. py:attribute:: received_at :type: sqlalchemy.orm.Mapped[datetime.datetime] .. py:attribute:: items :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: recipes :type: sqlalchemy.orm.Mapped[int] .. py:class:: MarketItem Bases: :py:obj:`advanced_alchemy.base.UUIDAuditBase` One item's numbers at one house, from the latest feed. ``days`` holds ``[iso_day, min_price, market]``. .. py:attribute:: house_id :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: item_id :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: name :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: quality :type: sqlalchemy.orm.Mapped[str | None] .. py:attribute:: stack_size :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: vendor_buy :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: vendor_sell :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: min_price :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: quantity :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: market :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: sale_price :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: sold_per_day :type: sqlalchemy.orm.Mapped[float] .. py:attribute:: days :type: sqlalchemy.orm.Mapped[list] .. py:class:: MarketRecipe Bases: :py:obj:`advanced_alchemy.base.UUIDAuditBase` One recipe from the latest feed. ``reagents`` holds ``[item_id, quantity]`` pairs. .. py:attribute:: house_id :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: recipe_id :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: name :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: profession :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: crafted_item_id :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: crafted_quantity :type: sqlalchemy.orm.Mapped[float] .. py:attribute:: reagents :type: sqlalchemy.orm.Mapped[list]