String msg = (notification.equalsIgnoreCase("OUTDATED") ? "outbid by " + EnumChatFormatting.YELLOW + BazaarNotifier.df.format(Math.abs(order.pricePerUnit - bazaarSubItem.pricePerUnit)) + " coins" : "");
i also want to show how many orders has it been outbid by.
structure of it should be
{
  "success": true,
  "lastUpdated": 1590854517479,
  "products": {
    "INK_SACK:3": {
      "product_id": "INK_SACK:3",
      "sell_summary": [
        {
          "amount": 20569,
          "pricePerUnit": 4.2,
          "orders": 1
        },
        {
          "amount": 140326,
          "pricePerUnit": 3.8,
          "orders": 2
        }
      ],
      "buy_summary": [
        {
          "amount": 640,
          "pricePerUnit": 4.8,
          "orders": 1
        },
        {
          "amount": 640,
          "pricePerUnit": 4.9,
          "orders": 1
        },
        {
          "amount": 25957,
          "pricePerUnit": 5,
          "orders": 3
        }
      ],
      "quick_status": {
        "productId": "INK_SACK:3",
        "sellPrice": 4.2,
        "sellVolume": 409855,
        "sellMovingWeek": 8301075,
        "sellOrders": 11,
        "buyPrice": 4.99260315136572,
        "buyVolume": 1254854,
        "buyMovingWeek": 5830656,
        "buyOrders": 85
      }
    }
  }
}
and the bazaarItem type is
package dev.meyi.bn.json.resp;

import java.util.List;

public class BazaarItem {

  public String product_id;

  public List<BazaarSubItem> sell_summary;
  public List<BazaarSubItem> buy_summary;

  public BazaarItemSummary quick_status;

  public BazaarItem(String product_id, List<BazaarSubItem> sell_summary,
      List<BazaarSubItem> buy_summary,
      BazaarItemSummary quick_status) {
    this.product_id = product_id;
    this.sell_summary = sell_summary;
    this.buy_summary = buy_summary;
    this.quick_status = quick_status;
  }

  public static class BazaarSubItem {

    public int amount;
    public double pricePerUnit;
    public int orders;

    public BazaarSubItem(int amount, double pricePerUnit, int orders) {
      this.amount = amount;
      this.pricePerUnit = pricePerUnit;
      this.orders = orders;
    }

    public double getPriceWithTax() {
      return pricePerUnit * 0.99d;
    }
  }

  public static class BazaarItemSummary {

    public String productId;
    public double sellPrice;
    public long sellVolume;
    public long sellMovingWeek;
    public long sellOrders;
    public double buyPrice;
    public long buyVolume;
    public long buyMovingWeek;
    public long buyOrders;

    public BazaarItemSummary(String productId, double sellPrice, long sellVolume,
        long sellMovingWeek, long sellOrders,
        double buyPrice, long buyVolume, long buyMovingWeek, long buyOrders) {
      this.productId = productId;
      this.sellPrice = sellPrice;
      this.sellVolume = sellVolume;
      this.sellMovingWeek = sellMovingWeek;
      this.sellOrders = sellOrders;
      this.buyPrice = buyPrice;
      this.buyVolume = buyVolume;
      this.buyMovingWeek = buyMovingWeek;
      this.buyOrders = buyOrders;
    }

  }
}

in this code
public static void chatNotification(Order order, String notification, BazaarItem.BazaarSubItem bazaarSubItem, BazaarItem currentStats) {
    if (!BazaarNotifier.config.showChatMessages) {
      return;
    }
    EnumChatFormatting messageColor =
        (notification.equalsIgnoreCase("REVIVED") ? EnumChatFormatting.GREEN
            : order.type.equals(Order.OrderType.BUY) ? EnumChatFormatting.DARK_PURPLE
                : EnumChatFormatting.BLUE);
    if (Order.OrderType.BUY.equals(order.type)) {
      something here als omake else for sell, and for buy orders btw it is itemStats.selll_summary, check the prices of them and compare to order.pricePerUnit to find how many orders are in between
    }
    String msg = (notification.equalsIgnoreCase("OUTDATED") ? "outbid by " + EnumChatFormatting.YELLOW + BazaarNotifier.df.format(Math.abs(order.pricePerUnit - bazaarSubItem.pricePerUnit)) + " coins" : "");
    if (Minecraft.getMinecraft().thePlayer != null) {
      Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(
          messageColor + order.type.longName
              + EnumChatFormatting.GRAY + " for "
              + messageColor + BazaarNotifier.dfNoDecimal
              .format(order.startAmount)
              + EnumChatFormatting.GRAY + "x " + messageColor
              + order.product
              + EnumChatFormatting.YELLOW
              + " " + notification + " " + EnumChatFormatting.GRAY + "("
              + messageColor + BazaarNotifier.df.format(order.pricePerUnit)
              + EnumChatFormatting.GRAY + ") "
              + msg
          ));
      playSound("/Users/simomac/Downloads/noteblock1.wav");
      playSound("/Users/simomac/Downloads/noteblock.wav");
    }
  }