# Market report ## `GET /api/guilds/{guild_id}/market-report` **Get the market report for the bot** The same report members see, for the bot's daily post. Answers 404 before the first price feed, or for any guild_id other than the SideQuest server. **Parameters** | Name | In | Type | Required | Description | |---|---|---|---|---| | `guild_id` | path | integer | yes | The Discord server ID. Only the SideQuest server works. | | `kind` | query | string | no | `daily` compares with the week before; `weekly` compares with last week. | **Response `200` — The market report.** Model: {ref}`MarketReport ` | Field | Type | Required | Description | |---|---|---|---| | `kind` | string | yes | `daily` compares with the week before; `weekly` with last week. | | `house_name` | string | yes | The auction house the numbers come from. | | `data_at` | string (date-time) | yes | When the auction house data was taken. | | `stale` | boolean | yes | Whether the data is more than 36 hours old. | | `period_start` | string (date) | yes | The first whole day the report covers. | | `period_end` | string (date) | yes | The last whole day the report covers: the day before `data_at`. | | `gathering` | array of {ref}`MarketGatherSection ` | yes | One section per gathering profession. | | `crafting` | array of {ref}`MarketCraftSection ` | yes | One section per crafting profession. | | `risers` | array of {ref}`MarketMover ` | yes | Biggest price rises, largest first. | | `fallers` | array of {ref}`MarketMover ` | yes | Biggest price drops, largest first. | ## `POST /api/market/feed` **Send the market feed** Replaces one auction house's item numbers and recipes. Needs the `X-Market-Key` header. Answers 503 while the site has no feed key set. **Request body** Model: {ref}`MarketFeed ` | Field | Type | Required | Description | |---|---|---|---| | `house_id` | integer | yes | The auction house's Battle.net ID. | | `house_name` | string | yes | The house's name. | | `snapshot_at` | string (date-time) | yes | When the auction house data behind these numbers was taken. | | `items` | array of {ref}`MarketFeedItem ` | yes | Every item the report may use. | | `recipes` | array of {ref}`MarketFeedRecipe ` | yes | Every recipe the report may use. | **Response `201` — How many items and recipes were stored.** Model: {ref}`MarketFeedReceipt ` | Field | Type | Required | Description | |---|---|---|---| | `items` | integer | yes | Items stored. | | `recipes` | integer | yes | Recipes stored. | ## `GET /api/market/report` **Get the market report** What to gather and craft for gold on the guild's auction house: the best materials per gathering profession with where to find them, the best crafts per crafting profession with their material costs, and the biggest price moves. Answers 404 before the first price feed. **Parameters** | Name | In | Type | Required | Description | |---|---|---|---|---| | `kind` | query | string | no | `daily` compares with the week before; `weekly` compares with last week. | **Response `200` — The market report.** Model: {ref}`MarketReport ` | Field | Type | Required | Description | |---|---|---|---| | `kind` | string | yes | `daily` compares with the week before; `weekly` with last week. | | `house_name` | string | yes | The auction house the numbers come from. | | `data_at` | string (date-time) | yes | When the auction house data was taken. | | `stale` | boolean | yes | Whether the data is more than 36 hours old. | | `period_start` | string (date) | yes | The first whole day the report covers. | | `period_end` | string (date) | yes | The last whole day the report covers: the day before `data_at`. | | `gathering` | array of {ref}`MarketGatherSection ` | yes | One section per gathering profession. | | `crafting` | array of {ref}`MarketCraftSection ` | yes | One section per crafting profession. | | `risers` | array of {ref}`MarketMover ` | yes | Biggest price rises, largest first. | | `fallers` | array of {ref}`MarketMover ` | yes | Biggest price drops, largest first. |