prebid / prebid-server

Open-source solution for running real-time advertising auctions in the cloud.
https://prebid.org/product-suite/prebid-server/
Apache License 2.0
403 stars 698 forks source link

Collect and enforce bidder currency requirement #3746

Open bretg opened 2 weeks ago

bretg commented 2 weeks ago

Our advice for bid adapters related to currency is at https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html#currency .

This works fine as long as the bidder has their own adapter, but doesn't work if they're an alias of the 'generic' bidder.

I propose adding a currency setting to the YAML:

adapters:
  generic:
    endpoint: https://
    aliases:
      bidderA:
        enabled: true
        endpoint: ...
        meta-info:
          currency-accepted:
            - USD
            - CAD
          currency-conversion-allowed: true
          maintainer-email: ...
          site-media-types:
            - banner
          vendor-id: 999999

If the bidder defines currency-accepted and $.cur doesn't intersect, then don't call this bidder/alias. Log a seatnonbid code 200 "Request blocked - General"

bretg commented 2 weeks ago

We should make a new, more specific seatnonbid code on this.