Enum OpenRtbMacros

  • All Implemented Interfaces:
    SnippetMacroType, Serializable, Comparable<OpenRtbMacros>

    public enum OpenRtbMacros
    extends Enum<OpenRtbMacros>
    implements SnippetMacroType
    OpenRTB 4.6: Standard OpenRTB macros.

    All Bid properties of type String can use macros. Important notes about macro expansion:

    • All properties can safely use macros that refer to values from the request: AUCTION_ID, AUCTION_CURRENCY, AUCTION_IMP_ID, AUCTION_SEAT_ID.
    • All properties can also safely use macros that refer to properties that have non-String type, so they cannot contain macros: AUCTION_PRICE.
    • Properties are processed in two stages. The first stage resolves properties that can contain macros AND feed other macros; adid => AUCTION_AD_ID, id => AUCTION_BID_ID are currently the only items in this group. In the second stage, we process the properties that support macros but don't provide values for any macro, which are: adm, cid, crid, dealid, iurl, nurl.
    • Notice that {code impid} is expected to be set to AUCTION_IMP_ID; you can use the macro or set the value manually but in the latter case they should match. All other properties that use the macro AUCTION_IMP_ID will resolve that to the bid's {code Imp.id}, not to the bid's own {code impid} property.
    • Enum Constant Detail

      • AUCTION_AD_ID

        public static final OpenRtbMacros AUCTION_AD_ID
        ID of the ad markup the bid wishes to serve; from "adid" attribute.
      • AUCTION_BID_ID

        public static final OpenRtbMacros AUCTION_BID_ID
        ID of the bid; from "bidid" attribute.
      • AUCTION_CURRENCY

        public static final OpenRtbMacros AUCTION_CURRENCY
        The currency used in the bid (explicit or implied); for confirmation only.

        WARNING: May not be supported by all exchanges.

      • AUCTION_ID

        public static final OpenRtbMacros AUCTION_ID
        ID of the bid request; from "id" attribute.
      • AUCTION_IMP_ID

        public static final OpenRtbMacros AUCTION_IMP_ID
        ID of the impression just won; from "impid" attribute.

        WARNING: May not be supported by all exchanges.

      • AUCTION_PRICE

        public static final OpenRtbMacros AUCTION_PRICE
        Settlement price using the same currency and units as the bid.

        WARNING: May not be supported by all exchanges.

      • AUCTION_SEAT_ID

        public static final OpenRtbMacros AUCTION_SEAT_ID
        ID of the bidder's seat for whom the bid was made.
      • AUCTION_LOSS

        public static final OpenRtbMacros AUCTION_LOSS
        Loss reason codes, for loss notices.

        WARNING: May not be supported by all exchanges.

      • AUCTION_MBR

        public static final OpenRtbMacros AUCTION_MBR
        Market Bid Ratio, defined as: (clearance price / bid price).

        WARNING: May not be supported by all exchanges.

    • Method Detail

      • values

        public static OpenRtbMacros[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (OpenRtbMacros c : OpenRtbMacros.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static OpenRtbMacros valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • key

        public final String key()
        Returns the key for this macro (string that will be substituted when the macro is processed).
        Specified by:
        key in interface SnippetMacroType