The bid sanity gate compares each bid’sDocumentation Index
Fetch the complete documentation index at: https://docs.pecta.ai/llms.txt
Use this file to discover all available pages before exploring further.
price against the bidfloor declared on the corresponding impression in the request. A bid price that is many multiples of the floor typically signals a misconfigured bidder — a stale price config, a decimal-point shift, or a currency mismatch. Letting such bids through inflates auction clearing prices and corrupts pacing data.
Usage
Options
The maximum ratio of
bid.price to imp.bidfloor allowed. A bid priced at more than this multiple of the floor fails the gate. Defaults to 50. Must be a positive number — passing zero or a negative value throws at construction time.A hard upper bound on bid price regardless of the floor. Useful when you want to cap absolute values in addition to the floor-relative check. Defaults to
Infinity (no hard cap).Override the gate’s name in evaluation results and telemetry.
What the gate checks
For every bid inseatbid[].bid[], the gate validates:
- Missing price —
bid.priceis absent or not a finite number → fails with"bid missing price" - Negative price —
bid.price < 0→ fails with"bid price is negative" - Hard cap exceeded —
bid.price > maxPrice→ fails with the price and cap value - Floor ratio exceeded —
bid.price / imp.bidfloor > maxFloorMultiple→ fails with the computed ratio
imp[].bidfloor on the matching impression (matched by bid.impid). If the impression has no bidfloor set, or if the floor is zero or negative, the ratio check is skipped and only the hard cap applies.
Example: failing bid
A request declares a floor of0.50 CPM for impression imp-001:
75.00 — 150× the floor:
Skipping behaviour
The gate returnspassed: true, skipped: true when the response contains no bids. If a bid’s impid does not match any impression in the request, the floor check is skipped for that bid (only the hard cap applies).
The
bidfloorcur field is read from the request impression but is not used in the ratio calculation — all values are compared as raw numbers. Ensure your bidder normalises prices to the same currency as the floor before submitting.