REST Resource: bidders.biddingFunctions

Resource: BiddingFunction

The bidding function to be executed as part of the TURTLEDOVE simulation experiment bidding flow.

JSON representation
{
  "name": string,
  "biddingFunction": string
}
Fields
name

string

The name of the bidding function that must follow the pattern: bidders/{bidder_account_id}/biddingFunctions/{bidding_function_name}.

biddingFunction

string

The raw Javascript source code of the bidding function.

The function takes in a Javascript object, inputs, that contains the following named fields: openrtbContextualBidRequest OR googleContextualBidRequest, customContextualSignal, interestBasedBidData, interestGroupData, recentImpressionAges, and returns the bid price CPM (double). Example:

/* Returns a bid price CPM (double).
 *
 * @param {Object} inputs an object with the
 *                 following named fields:
 *                   - openrtbContextualBidRequest
 *                         OR googleContextualBidRequest
 *                   - customContextualSignal
 *                   - interestBasedBidData
 *                   - interestGroupData
 *                   - recentImpressionAges
 */
function biddingFunction(inputs) {
  ...
  return inputs.interestBasedBidData.cpm
      * inputs.customContextualSignals.placementMultiplier;
}

Methods

create

Creates a new bidding function.

list

Lists the bidding functions that a bidder currently has registered.