How prices work

The API computes sell prices the way the game does, to the copper, and checks itself against the prices the game computed for every recipe, aging and quality. 1 silver is 100 copper and 1 gold is 100 silver; every amount comes as copper plus a display string.

GET /v1/items/milk-stout/price?ingredients=expensive&aging=grand_reserve&quality=superior
{
  "method": "recipe",
  "per_serving": { "copper": 1173, "display": "11s 73c" },
  "steps": [
    { "step": "base", "copper": 669 },
    { "step": "aging", "copper": 869, "add_copper": 200 },
    { "step": "quality", "copper": 1173, "multiplier": 1.35 }
  ],
  "verified_by_game": true
}

The steps

  1. Base price per serving: the value of the ingredients plus the recipe's labor cost, divided by the servings the recipe makes. It is recursive: malt and wort are priced with the same rule. When the recipe takes "any malt", ingredients=cheapest or expensive decides which one counts.
  2. Aging adds 10 % (young), 20 % (reserve) or 30 % (grand reserve) of the base, for products that can age.
  3. Crafter quality multiplies by 1.15 (advanced) or 1.35 (superior).
  4. Perks from the menu pages raise the price of their category: perks=beer:10,dessert:5. Accepted names: starter, meat, vegetables, fish, pasta_rice, broth, dessert, cocktail, beer, liqueur.

The game drops the fractions of a copper at each step, and so does the API.

Fields worth knowing

  • verified_by_game: true when the game computed the same value; null for combinations it did not compute.
  • playable: the game's "cheapest" picks the cheapest grain for every malt even when the recipe asks for a specific one. playable.per_serving is the price a player can really reach.
  • method: recipe, legacy (old recipes priced by an older formula) or raw (a fixed value).

The ingredients a dish was made with

A cooked dish remembers what went into it, and the game prices it with those ingredients: a grilled steak is worth more with lamb than with rat. picks names them, as the in-game tooltip lists them:

GET /v1/items/grilled-steak/price?picks=lamb-meat
GET /v1/items/lager/price?aging=grand_reserve&picks=wheat,aroma-hops

Every ingredient line of the response carries options, the foods a player can use in that group, so a client can offer the choice. Groups that accept dozens of foods come with an empty list. A pick that belongs to no group of the recipe is refused with a 422.

What the game shows in your tavern

The "Sell" tooltip in a tavern is not the sell price alone. The game builds a reference price from the state of the save and lets the player move the menu price around it. The response describes it in menu:

  1. Items on the bar: 3 copper for every distinct dish or drink on sale (bar_items).
  2. Trends: a trending meal adds 20 % of the sell price (and 5 % more with the trendsetter perk, perks=trendsetter:5), an unpopular one takes 10 % away; each trending ingredient adds 10 %, each unpopular one takes 5 % (meal_trend, trending_ingredients, unpopular_ingredients).
  3. Satisfaction: the week's customer satisfaction scales the result by -10 % to +10 % (satisfaction).
  4. Menu clicks: each press of [+] or [-] on the dish moves the price by 2 % of the reference, never beyond ±50 % of it (menu_clicks).
GET /v1/items/lager/price?aging=grand_reserve&picks=wheat,aroma-hops&bar_items=8&satisfaction=9
{
  "per_serving": { "copper": 569, "display": "5s 69c" },
  "menu": {
    "reference": { "copper": 646, "display": "6s 46c" },
    "price": { "copper": 646, "display": "6s 46c" },
    "click": { "copper": 13, "display": "13c" },
    "steps": [
      { "step": "bar_items", "copper": 593, "label": "8", "add_copper": 24 },
      { "step": "satisfaction", "copper": 646, "label": "9" }
    ]
  }
}

Leave these parameters out and menu.price equals per_serving. The formulas come from the game's own code and were checked against prices read in a real tavern.