Skip to content

Floxis: convert non-USD floors and request currency to USD - #4694

Open
floxis-admin wants to merge 2 commits into
prebid:masterfrom
floxis-admin:floxis-usd-floors
Open

floxis-admin wants to merge 2 commits into
prebid:masterfrom
floxis-admin:floxis-usd-floors

Conversation

@floxis-admin

@floxis-admin floxis-admin commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

The Floxis exchange bids in USD only and rejects requests that offer no USD. This updates the Floxis bidder (and its adapex alias):

  • A floor in another currency is converted to USD with CurrencyConversionService, and bidfloorcur is set to USD. If the conversion fails, that impression is skipped with a bad-input error.
  • When cur is set and does not include USD, the outgoing request sets cur to ["USD"]. Requests without cur, or already including USD, are unchanged.
  • A bid's adomain is copied to ext.prebid.meta.advertiserDomains, keeping any other bid.ext fields.

FloxisBidderTest (31), the FloxisTest and AdapexTest ITs and checkstyle pass.

Go port: prebid/prebid-server#5066.

🤖 Generated with Claude Code

Comment on lines +432 to +438
final BidRequest bidRequest = givenBidRequest(imp -> imp
.bidfloor(BigDecimal.ONE)
.bidfloorcur("EUR")
.ext(givenImpExt("abc", "us-e")))
.toBuilder()
.cur(singletonList("EUR"))
.build();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add givenBidRequest(UnaryOperator<BidRequest.Builder> bidRequestCustomizer, Imp.. imps) method and use it instead

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in db88417: added givenBidRequest(UnaryOperator<BidRequest.BidRequestBuilder> bidRequestCustomizer, Imp... imps), and the conversion test uses it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test that cur array won't be changed if it contains USD

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in db88417: makeHttpRequestsShouldNotChangeRequestCurrencyWhenItContainsUsd sends cur ["EUR", "USD"] and expects it unchanged.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see some missed changes from GO version:

			if len(seatBid.Bid[i].ADomain) > 0 {
				typedBid.BidMeta = &openrtb_ext.ExtBidPrebidMeta{AdvertiserDomains: seatBid.Bid[i].ADomain}
			}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in db88417: a bid with adomain now gets ext.prebid.meta.advertiserDomains, keeping any other bid.ext fields, covered by makeBidsShouldAddAdvertiserDomainsToBidMetaAndKeepBidExt. The branch is also rebased on master after #4676.

floxis-admin and others added 2 commits November 3, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants