auctions ======== .. py:module:: sidequest_common.schemas.auctions .. autoapi-nested-parse:: Auction house prices: public prices, member price-watch alerts, and the bot's sync/alert feed. ``local://auctions-contract.md`` is the source of truth. Battle.net serves fifteen auction houses per ruleset (five each for Alliance, Horde and Blackwater); SideQuest prices items from every house of its own faction. Money is copper (an ``int``); the website and bot each format it as ``1g 20s 5c``. .. py:data:: AUCTION_TREND_DAYS :value: 14 .. py:data:: AUCTION_HISTORY_DAYS :value: 90 .. py:data:: MAX_AUCTION_WATCHES :value: 25 .. py:data:: MAX_PRICE_IDS :value: 200 .. py:data:: IMPORT_PRICES_LIMIT :value: 500 .. py:data:: AUCTION_ALERT_COOLDOWN_HOURS :value: 24 .. py:class:: AuctionHousePrice Bases: :py:obj:`pydantic.BaseModel` One auction house's current price for an item. .. py:attribute:: house_id :type: int .. py:attribute:: house_name :type: str .. py:attribute:: unit_price :type: int .. py:attribute:: quantity :type: int .. py:attribute:: listings :type: int .. py:attribute:: updated_at :type: datetime.datetime .. py:class:: AuctionTrendPoint Bases: :py:obj:`pydantic.BaseModel` One day's lowest unit price in an item's price trend. .. py:attribute:: day :type: datetime.date .. py:attribute:: unit_price :type: int .. py:class:: ItemAuctionPrice Bases: :py:obj:`pydantic.BaseModel` ``GET /api/auctions/prices/{item_id}``: one item's current price across every house of the guild's faction. .. py:attribute:: item_id :type: int .. py:attribute:: unit_price :type: int | None .. py:attribute:: quantity_total :type: int .. py:attribute:: houses :type: list[AuctionHousePrice] .. py:attribute:: trend :type: list[AuctionTrendPoint] .. py:attribute:: updated_at :type: datetime.datetime | None .. py:class:: ItemPriceSummary Bases: :py:obj:`pydantic.BaseModel` One item's price in a batch price lookup, without its per-house breakdown or trend. .. py:attribute:: item_id :type: int .. py:attribute:: unit_price :type: int | None .. py:attribute:: quantity_total :type: int .. py:attribute:: updated_at :type: datetime.datetime | None .. py:class:: AuctionPriceMap Bases: :py:obj:`pydantic.BaseModel` ``GET /api/auctions/prices?ids=...``: one entry per requested item ID, in request order. .. py:attribute:: prices :type: list[ItemPriceSummary] .. py:class:: AuctionSyncHouse Bases: :py:obj:`pydantic.BaseModel` One house's counts from an auction sync. .. py:attribute:: house_id :type: int .. py:attribute:: house_name :type: str .. py:attribute:: auctions :type: int .. py:attribute:: commodities :type: int .. py:class:: AuctionSyncReport Bases: :py:obj:`pydantic.BaseModel` ``POST /api/guilds/{guild_id}/auctions/sync``: what the sync fetched, priced and queued. .. py:attribute:: houses :type: list[AuctionSyncHouse] .. py:attribute:: items_priced :type: int .. py:attribute:: alerts_queued :type: int .. py:class:: AuctionWatch Bases: :py:obj:`pydantic.BaseModel` One of a member's auction price watches. .. py:attribute:: id :type: uuid.UUID .. py:attribute:: item_id :type: int .. py:attribute:: item_name :type: str | None .. py:attribute:: icon_url :type: str | None .. py:attribute:: max_unit_price :type: int .. py:attribute:: current_unit_price :type: int | None .. py:attribute:: created_at :type: datetime.datetime .. py:attribute:: last_alerted_at :type: datetime.datetime | None .. py:class:: AuctionWatchCreate Bases: :py:obj:`pydantic.BaseModel` Body for ``POST /api/me/auction-watches`` (and the bot's member variant): upserts by ``item_id``. .. py:attribute:: item_id :type: int .. py:attribute:: max_unit_price :type: int .. py:class:: AuctionAlertSchema Bases: :py:obj:`pydantic.BaseModel` One queued price alert, as the bot's pending-alerts feed returns it. .. py:attribute:: id :type: uuid.UUID .. py:attribute:: discord_user_id :type: int .. py:attribute:: member_name :type: str .. py:attribute:: item_id :type: int .. py:attribute:: item_name :type: str | None .. py:attribute:: icon_url :type: str | None .. py:attribute:: unit_price :type: int .. py:attribute:: max_unit_price :type: int .. py:attribute:: quantity :type: int .. py:attribute:: house_name :type: str .. py:attribute:: created_at :type: datetime.datetime