Skip to content

Comments

RTBStack adapter#4685

Open
volokha wants to merge 7 commits intoprebid:masterfrom
volokha:rtb-stack-adapter
Open

RTBStack adapter#4685
volokha wants to merge 7 commits intoprebid:masterfrom
volokha:rtb-stack-adapter

Conversation

@volokha
Copy link

@volokha volokha commented Feb 10, 2026

Hi Prebid Team,

I'm Alexander, part of the RTBStack team within the Admixer ecosystem. We're excited to contribute our RTBStack adapter to Prebid Server, supporting multiple ad formats including banner, video, native, and audio for both site and app environments.
This adapter is built with full OpenRTB 2.x compliance and includes robust request/response handling, custom parameters, and sample test cases for various scenarios. We believe it will add valuable functionality for publishers and bidders integrating with the RTBStack platform.
We'd love your review and feedback to get this contribution merged. Thank you for maintaining such an awesome project!

Best regards,
Alexander
RTBStack / Admixer

func getMediaTypeForImp(impID string, imps []openrtb2.Imp) openrtb_ext.BidType {
for _, imp := range imps {
if imp.ID == impID {
if imp.Banner != nil {

Choose a reason for hiding this comment

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

Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeBanner. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

if imp.ID == impID {
if imp.Banner != nil {
return openrtb_ext.BidTypeBanner
} else if imp.Video != nil {

Choose a reason for hiding this comment

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

Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeVideo. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

return openrtb_ext.BidTypeBanner
} else if imp.Video != nil {
return openrtb_ext.BidTypeVideo
} else if imp.Native != nil {

Choose a reason for hiding this comment

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

Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeNative. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

return openrtb_ext.BidTypeVideo
} else if imp.Native != nil {
return openrtb_ext.BidTypeNative
} else if imp.Audio != nil {

Choose a reason for hiding this comment

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

Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeAudio. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, f6d7c97

rtbstack

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:35:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:42:	MakeRequests		93.1%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:104:	MakeBids		93.3%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:137:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:141:	preprocessImp		84.6%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:174:	getMediaTypeForImp	90.9%
total:									(statements)		91.5%

@@ -0,0 +1,17 @@
endpoint: "http://{{.Host}}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hello. We do not allow the domain name to be configurable due to security issues. Additionally, we highly discourage subdomains as they negatively affect the performance of maintaining connections to your bidding server. Please see our bidder development guide for further information: https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html

Copy link
Author

Choose a reason for hiding this comment

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

Hi @bsardo,

Thank you for taking the time to review this.

Based on my understanding and by looking at other adapters (for example, Tappx), this approach has been used before, so we followed an established pattern. That said, I completely understand that the requirements or expectations may have evolved since then.

Our main goal is to keep the logic consistent between the Prebid.js adapter and the Prebid Server implementation. At the same time, we've already shared the current EndpointURL with a large number of publishers, so making a breaking change would be difficult and could negatively impact them.

With that in mind, I'd like to propose a possible compromise. On the Prebid Server side, we could use a static domain (for example, rtb-stack.com), while still allowing the subdomain and query parameters to remain dynamic via macros. This would move us closer to the current policy while minimizing disruption for existing publishers.

I'd really appreciate your thoughts on whether this could be an acceptable solution.

Thank you!

Copy link
Author

Choose a reason for hiding this comment

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

Hi @bsardo,

I’ve updated this PR and adjusted the implementation based on the previous feedback. Could you please take another look when you have a chance?

Copy link
Author

Choose a reason for hiding this comment

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

Hello @bsardo, hope you're doing well!

Could you please share an update on this PR? Also, it would be great to have an approximate ETA for availability, as our customers are waiting for it.

Thanks in advance!

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, f510625

rtbstack

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:35:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:42:	MakeRequests		93.1%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:104:	MakeBids		93.3%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:137:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:141:	preprocessImp		84.6%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:174:	getMediaTypeForImp	90.9%
total:									(statements)		91.5%

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 11dbfcd

rtbstack

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:35:	Builder			80.0%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:47:	MakeRequests		90.3%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:112:	MakeBids		93.3%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:145:	buildEndpointURL	75.0%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:168:	preprocessImp		84.6%
github.com/prebid/prebid-server/v3/adapters/rtbstack/rtbstack.go:201:	getMediaTypeForImp	90.9%
total:									(statements)		87.4%

@bsardo bsardo added the adapter label Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants