Repository: prebid/prebid-server
Pull request #2996 (2023-08-01 12:31:44)

 validate capabilities in alias config
This PR adds validation checks for alias capabilities. This check makes sure that values defined for alias capabilities are subset of parent bidder capabilities values.


Patch:
diff --git a/adapters/adquery/adquery.go b/adapters/adquery/adquery.go
new file mode 100644
index 00000000..6a7dafa0
--- /dev/null
+++ b/adapters/adquery/adquery.go
@@ -0,0 +1,207 @@
+package adquery
+
+import (
+	"encoding/json"
+	"fmt"
+	"net/http"
+	"regexp"
+	"strconv"
+	"strings"
+
+	"github.com/prebid/openrtb/v19/openrtb2"
+	"github.com/prebid/prebid-server/adapters"
+	"github.com/prebid/prebid-server/config"
+	"github.com/prebid/prebid-server/errortypes"
+	"github.com/prebid/prebid-server/openrtb_ext"
+)
+
+const (
+	defaultCurrency string = "PLN"
+	bidderName      string = "adquery"
+	prebidVersion   string = "server"
+)
+
+type adapter struct {
+	endpoint string
+}
+
+// Builder builds a new instance of the Adquery adapter for the given bidder with the given config.
+func Builder(_ openrtb_ext.BidderName, config config.Adapter, _ config.Server) (adapters.Bidder, error) {
+	bidder := &adapter{
+		endpoint: config.Endpoint,
+	}
+	return bidder, nil
+}
+
+func (a *adapter) MakeRequests(request *openrtb2.BidRequest, _ *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
+	headers := http.Header{}
+	headers.Add("Content-Type", "application/json;charset=utf-8")
+	headers.Add("Accept", "application/json")
+	headers.Add("x-openrtb-version", "2.5")
+
+	var result []*adapters.RequestData
+	var errs []error
+	for _, imp := range request.Imp {
+		ext, err := parseExt(imp.Ext)
+		if err != nil {
+			errs = append(errs, &errortypes.BadInput{err.Error()})
+			continue
+		}
+
+		requestJSON, err := json.Marshal(buildRequest(request, &imp, ext))
+		if err != nil {
+			return nil, append(errs, err)
+		}
+
+		data := &adapters.RequestData{
+			Method:  "POST",
+			Uri:     a.endpoint,
+			Body:    requestJSON,
+			Headers: headers,
+		}
+		result = append(result, data)
+	}
+
+	return result, errs
+}
+
+func (a *adapter) MakeBids(request *openrtb2.BidRequest, _ *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) {
+	if adapters.IsResponseStatusCodeNoContent(responseData) {
+		return nil, nil
+	}
+
+	err := adapters.CheckResponseStatusCodeForErrors(responseData)
+	if err != nil {
+		return nil, []error{err}
+	}
+
+	respData, price, width, height, errs := parseResponseJson(responseData.Body)
+	if len(errs) > 0 {
+		return nil, errs
+	}
+
+	if respData == nil {
+		return adapters.NewBidderResponse(), nil
+	}
+
+	bidResponse := adapters.NewBidderResponseWithBidsCapacity(1)
+	if respData.Currency != "" {
+		bidResponse.Currency = respData.Currency
+	} else {
+		bidResponse.Currency = defaultCurrency
+	}
+
+	var bidReqIdRegex = regexp.MustCompile(`^` + request.ID)
+	impId := bidReqIdRegex.ReplaceAllLiteralString(respData.ReqID, "")
+
+	bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{
+		Bid: &openrtb2.Bid{
+			// There's much more possible fields to be added here, see OpenRTB docs for reference (type: Bid)
+			ID:      respData.ReqID,
+			ImpID:   impId,
+			Price:   price,
+			AdM:     fmt.Sprintf("<script src=\"%s\"></script>%s", respData.AdQLib, respData.Tag),
+			ADomain: respData.ADomains,
+			CrID:    fmt.Sprintf("%d", respData.CrID),
+			W:       width,
+			H:       height,
+		},
+		BidType: respData.MediaType.Name,
+	})
+
+	return bidResponse, nil
+}
+
+func buildRequest(bidReq *openrtb2.BidRequest, imp *openrtb2.Imp, ext *openrtb_ext.ImpExtAdQuery) *BidderRequest {
+	userId := ""
+	if bidReq.User != nil {
+		userId = bidReq.User.ID
+	}
+
+	return &BidderRequest{
+		V:                   prebidVersion,
+		PlacementCode:       ext.PlacementID,
+		AuctionId:           "",
+		BidType:             ext.Type,
+		AdUnitCode:          imp.TagID,
+		BidQid:              userId,
+		BidId:               fmt.Sprintf("%s%s", bidReq.ID, imp.ID),
+		Bidder:              bidderName,
+		BidderRequestId:     bidReq.ID,
+		BidRequestsCount:    1,
+		BidderRequestsCount: 1,
+		Sizes:               getImpSizes(imp),
+	}
+}
+
+func parseExt(ext json.RawMessage) (*openrtb_ext.ImpExtAdQuery, error) {
+	var bext adapters.ExtImpBidder
+	err := json.Unmarshal(ext, &bext)
+	if err != nil {
+		return nil, err
+	}
+
+	var adsExt openrtb_ext.ImpExtAdQuery
+	err = json.Unmarshal(bext.Bidder, &adsExt)
+	if err != nil {
+		return nil, err
+	}
+
+	// not validating, because it should have been done earlier by the server
+	return &adsExt, nil
+}
+
+func parseResponseJson(respBody []byte) (*ResponseData, float64, int64, int64, []error) {
+	var response ResponseAdQuery
+	if err := json.Unmarshal(respBody, &response); err != nil {
+		return nil, 0, 0, 0, []error{err}
+	}
+
+	if response.Data == nil {
+		return nil, 0, 0, 0, nil
+	}
+
+	var errs []error
+	price, err := strconv.ParseFloat(response.Data.CPM, 64)
+	if err != nil {
+		errs = append(errs, err)
+	}
+	width, err := strconv.ParseInt(response.Data.MediaType.Width, 10, 64)
+	if err != nil {
+		errs = append(errs, err)
+	}
+	height, err := strconv.ParseInt(response.Data.MediaType.Height, 10, 64)
+	if err != nil {
+		errs = append(errs, err)
+	}
+
+	if response.Data.MediaType.Name != openrtb_ext.BidTypeBanner {
+		return nil, 0, 0, 0, []error{fmt.Errorf("unsupported MediaType: %s", response.Data.MediaType.Name)}
+	}
+
+	if len(errs) > 0 {
+		return nil, 0, 0, 0, errs
+	}
+	return response.Data, price, width, height, nil
+}
+
+func getImpSizes(imp *openrtb2.Imp) string {
+	if imp.Banner == nil {
+		return ""
+	}
+
+	if len(imp.Banner.Format) > 0 {
+		sizes := make([]string, len(imp.Banner.Format))
+		for i, format := range imp.Banner.Format {
+			sizes[i] = strconv.FormatInt(format.W, 10) + "x" + strconv.FormatInt(format.H, 10)
+		}
+
+		return strings.Join(sizes, ",")
+	}
+
+	if imp.Banner.W != nil && imp.Banner.H != nil {
+		return strconv.FormatInt(*imp.Banner.W, 10) + "x" + strconv.FormatInt(*imp.Banner.H, 10)
+	}
+
+	return ""
+}
diff --git a/adapters/adquery/types.go b/adapters/adquery/types.go
new file mode 100644
index 00000000..e46afaea
--- /dev/null
+++ b/adapters/adquery/types.go
@@ -0,0 +1,42 @@
+package adquery
+
+import "github.com/prebid/prebid-server/openrtb_ext"
+
+type BidderRequest struct {
+	V                   string `json:"v"`
+	PlacementCode       string `json:"placementCode"`
+	AuctionId           string `json:"auctionId,omitempty"`
+	BidType             string `json:"type"`
+	AdUnitCode          string `json:"adUnitCode"`
+	BidQid              string `json:"bidQid"`
+	BidId               string `json:"bidId"`
+	Bidder              string `json:"bidder"`
+	BidPageUrl          string `json:"bidPageUrl"`
+	BidderRequestId     string `json:"bidderRequestId"`
+	BidRequestsCount    int    `json:"bidRequestsCount"`
+	BidderRequestsCount int    `json:"bidderRequestsCount"`
+	Sizes               string `json:"sizes"`
+}
+
+type ResponseAdQuery struct {
+	Data *ResponseData `json:"data"`
+}
+
+type ResponseData struct {
+	ReqID     string           `json:"requestId"`
+	CrID      int64            `json:"creationId"`
+	Currency  string           `json:"currency"`
+	CPM       string           `json:"cpm"`
+	Code      string           `json:"code"`
+	AdQLib    string           `json:"adqLib"`
+	Tag       string           `json:"tag"`
+	ADomains  []string         `json:"adDomains"`
+	DealID    string           `json:"dealid"`
+	MediaType AdQueryMediaType `json:"mediaType"`
+}
+
+type AdQueryMediaType struct {
+	Name   openrtb_ext.BidType `json:"name"`
+	Width  string              `json:"width"`
+	Height string              `json:"height"`
+}
diff --git a/adapters/emx_digital/emx_digitaltest/exemplary/banner-app.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/banner-app.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/exemplary/banner-app.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/banner-app.json
diff --git a/adapters/emx_digital/emx_digitaltest/exemplary/minimal-banner.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/minimal-banner.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/exemplary/minimal-banner.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/minimal-banner.json
diff --git a/adapters/emx_digital/emx_digitaltest/exemplary/video-app.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/video-app.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/exemplary/video-app.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/video-app.json
diff --git a/adapters/emx_digital/emx_digitaltest/exemplary/video-ctv.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/video-ctv.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/exemplary/video-ctv.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/video-ctv.json
diff --git a/adapters/emx_digital/emx_digitaltest/exemplary/video-site.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/video-site.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/exemplary/video-site.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/video-site.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/add-bidfloor.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/add-bidfloor.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/add-bidfloor.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/add-bidfloor.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/app-domain-and-url-correctly-parsed.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/app-domain-and-url-correctly-parsed.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/app-domain-and-url-correctly-parsed.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/app-domain-and-url-correctly-parsed.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/app-storeUrl-correctly-parsed.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/app-storeUrl-correctly-parsed.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/app-storeUrl-correctly-parsed.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/app-storeUrl-correctly-parsed.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/bad-imp-banner-missing-sizes.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/bad-imp-banner-missing-sizes.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/bad-imp-banner-missing-sizes.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/bad-imp-banner-missing-sizes.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/bad-imp-ext-tagid-value.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/bad-imp-ext-tagid-value.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/bad-imp-ext-tagid-value.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/bad-imp-ext-tagid-value.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/bad-imp-video-missing-mimes.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/bad-imp-video-missing-mimes.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/bad-imp-video-missing-mimes.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/bad-imp-video-missing-mimes.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/bad-imp-video-missing-sizes.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/bad-imp-video-missing-sizes.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/bad-imp-video-missing-sizes.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/bad-imp-video-missing-sizes.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/build-banner-object.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/build-banner-object.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/build-banner-object.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/build-banner-object.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/build-video-object.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/build-video-object.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/build-video-object.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/build-video-object.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/invalid-request-no-banner.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/invalid-request-no-banner.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/invalid-request-no-banner.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/invalid-request-no-banner.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/invalid-response-no-bids.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/invalid-response-no-bids.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/invalid-response-no-bids.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/invalid-response-no-bids.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/invalid-response-unmarshall-error.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/invalid-response-unmarshall-error.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/invalid-response-unmarshall-error.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/invalid-response-unmarshall-error.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/no-imps-in-request.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/no-imps-in-request.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/no-imps-in-request.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/no-imps-in-request.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/server-error-code.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/server-error-code.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/server-error-code.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/server-error-code.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/server-no-content.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/server-no-content.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/server-no-content.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/server-no-content.json
diff --git a/adapters/emx_digital/emx_digitaltest/supplemental/site-domain-and-url-correctly-parsed.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/site-domain-and-url-correctly-parsed.json
similarity index 100%
rename from adapters/emx_digital/emx_digitaltest/supplemental/site-domain-and-url-correctly-parsed.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/supplemental/site-domain-and-url-correctly-parsed.json
diff --git a/adapters/emx_digital/emx_digital.go b/adapters/cadent_aperture_mx/cadentaperturemx.go
similarity index 84%
rename from adapters/emx_digital/emx_digital.go
rename to adapters/cadent_aperture_mx/cadentaperturemx.go
index 1b38263c..5df000bf 100644
--- a/adapters/emx_digital/emx_digital.go
+++ b/adapters/cadent_aperture_mx/cadentaperturemx.go
@@ -1,4 +1,4 @@
-package emx_digital
+package cadentaperturemx
 
 import (
 	"encoding/json"
@@ -17,7 +17,7 @@ import (
 	"github.com/prebid/prebid-server/openrtb_ext"
 )
 
-type EmxDigitalAdapter struct {
+type adapter struct {
 	endpoint string
 	testing  bool
 }
@@ -33,7 +33,7 @@ func buildEndpoint(endpoint string, testing bool, timeout int64) string {
 	return endpoint + "?t=" + strconv.FormatInt(timeout, 10) + "&ts=" + strconv.FormatInt(time.Now().Unix(), 10) + "&src=pbserver"
 }
 
-func (a *EmxDigitalAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
+func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
 	var errs []error
 
 	if len(request.Imp) == 0 {
@@ -81,7 +81,7 @@ func (a *EmxDigitalAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *
 	}}, errs
 }
 
-func unpackImpExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpEmxDigital, error) {
+func unpackImpExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpCadentApertureMX, error) {
 	var bidderExt adapters.ExtImpBidder
 	if err := json.Unmarshal(imp.Ext, &bidderExt); err != nil {
 		return nil, &errortypes.BadInput{
@@ -89,27 +89,27 @@ func unpackImpExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpEmxDigital, error) {
 		}
 	}
 
-	var emxExt openrtb_ext.ExtImpEmxDigital
-	if err := json.Unmarshal(bidderExt.Bidder, &emxExt); err != nil {
+	var cadentExt openrtb_ext.ExtImpCadentApertureMX
+	if err := json.Unmarshal(bidderExt.Bidder, &cadentExt); err != nil {
 		return nil, &errortypes.BadInput{
 			Message: fmt.Sprintf("ignoring imp id=%s, invalid ImpExt", imp.ID),
 		}
 	}
 
-	tagIDValidation, err := strconv.ParseInt(emxExt.TagID, 10, 64)
+	tagIDValidation, err := strconv.ParseInt(cadentExt.TagID, 10, 64)
 	if err != nil || tagIDValidation == 0 {
 		return nil, &errortypes.BadInput{
 			Message: fmt.Sprintf("ignoring imp id=%s, invalid tagid must be a String of numbers", imp.ID),
 		}
 	}
 
-	if emxExt.TagID == "" {
+	if cadentExt.TagID == "" {
 		return nil, &errortypes.BadInput{
 			Message: fmt.Sprintf("Ignoring imp id=%s, no tagid present", imp.ID),
 		}
 	}
 
-	return &emxExt, nil
+	return &cadentExt, nil
 }
 
 func buildImpBanner(imp *openrtb2.Imp) error {
@@ -175,13 +175,13 @@ func cleanProtocol(protocols []adcom1.MediaCreativeSubtype) []adcom1.MediaCreati
 	return newitems
 }
 
-// Add EMX required properties to Imp object
-func addImpProps(imp *openrtb2.Imp, secure *int8, emxExt *openrtb_ext.ExtImpEmxDigital) {
-	imp.TagID = emxExt.TagID
+// Add Cadent required properties to Imp object
+func addImpProps(imp *openrtb2.Imp, secure *int8, cadentExt *openrtb_ext.ExtImpCadentApertureMX) {
+	imp.TagID = cadentExt.TagID
 	imp.Secure = secure
 
-	if emxExt.BidFloor != "" {
-		bidFloor, err := strconv.ParseFloat(emxExt.BidFloor, 64)
+	if cadentExt.BidFloor != "" {
+		bidFloor, err := strconv.ParseFloat(cadentExt.BidFloor, 64)
 		if err != nil {
 			bidFloor = 0
 		}
@@ -202,7 +202,7 @@ func addHeaderIfNonEmpty(headers http.Header, headerName string, headerValue str
 	}
 }
 
-// Handle request errors and formatting to be sent to EMX
+// Handle request errors and formatting to be sent to Cadent
 func preprocess(request *openrtb2.BidRequest) []error {
 	impsCount := len(request.Imp)
 	errors := make([]error, 0, impsCount)
@@ -225,13 +225,13 @@ func preprocess(request *openrtb2.BidRequest) []error {
 	}
 
 	for _, imp := range request.Imp {
-		emxExt, err := unpackImpExt(&imp)
+		cadentExt, err := unpackImpExt(&imp)
 		if err != nil {
 			errors = append(errors, err)
 			continue
 		}
 
-		addImpProps(&imp, &secure, emxExt)
+		addImpProps(&imp, &secure, cadentExt)
 
 		if imp.Video != nil {
 			if err := buildImpVideo(&imp); err != nil {
@@ -253,7 +253,7 @@ func preprocess(request *openrtb2.BidRequest) []error {
 }
 
 // MakeBids make the bids for the bid response.
-func (a *EmxDigitalAdapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) {
+func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) {
 
 	if response.StatusCode == http.StatusNoContent {
 		// no bid response
@@ -309,9 +309,9 @@ func ContainsAny(raw string, keys []string) bool {
 
 }
 
-// Builder builds a new instance of the EmxDigital adapter for the given bidder with the given config.
+// Builder builds a new instance of the Cadent Aperture MX adapter for the given bidder with the given config.
 func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) {
-	bidder := &EmxDigitalAdapter{
+	bidder := &adapter{
 		endpoint: config.Endpoint,
 		testing:  false,
 	}
diff --git a/adapters/flipp/flipp.go b/adapters/flipp/flipp.go
index 9705fa57..14f31a91 100644
--- a/adapters/flipp/flipp.go
+++ b/adapters/flipp/flipp.go
@@ -114,9 +114,7 @@ func (a *adapter) processImp(request *openrtb2.BidRequest, imp openrtb2.Imp) (*a
 	}
 
 	var userIP string
-	if flippExtParams.IP != "" {
-		userIP = flippExtParams.IP
-	} else if request.Device != nil && request.Device.IP != "" {
+	if request.Device != nil && request.Device.IP != "" {
 		userIP = request.Device.IP
 	} else {
 		return nil, fmt.Errorf("no IP set in flipp bidder params or request device")
diff --git a/adapters/rubicon/rubicon.go b/adapters/rubicon/rubicon.go
index 4c625bd0..a7ab9ad8 100644
--- a/adapters/rubicon/rubicon.go
+++ b/adapters/rubicon/rubicon.go
@@ -176,12 +176,6 @@ type rubiconUserExtEidExt struct {
 	Segments []string `json:"segments,omitempty"`
 }
 
-// defines the contract for bidrequest.user.ext.eids[i].uids[j].ext
-type rubiconUserExtEidUidExt struct {
-	RtiPartner string `json:"rtiPartner,omitempty"`
-	Stype      string `json:"stype"`
-}
-
 type mappedRubiconUidsParam struct {
 	segments    []string
 	liverampIdl string
@@ -940,15 +934,7 @@ func extractUserBuyerUID(eids []openrtb2.EID) string {
 		}
 
 		for _, uid := range eid.UIDs {
-			var uidExt rubiconUserExtEidUidExt
-			err := json.Unmarshal(uid.Ext, &uidExt)
-			if err != nil {
-				continue
-			}
-
-			if uidExt.Stype == "ppuid" || uidExt.Stype == "other" {
-				return uid.ID
-			}
+			return uid.ID
 		}
 	}
 
diff --git a/config/bidderinfo.go b/config/bidderinfo.go
index c0d89841..df9e9d5a 100644
--- a/config/bidderinfo.go
+++ b/config/bidderinfo.go
@@ -350,7 +350,7 @@ func (infos BidderInfos) validate(errs []error) []error {
 		if bidder.IsEnabled() {
 			errs = validateAdapterEndpoint(bidder.Endpoint, bidderName, errs)
 
-			if err := validateInfo(bidder, bidderName); err != nil {
+			if err := validateInfo(bidder, infos, bidderName); err != nil {
 				errs = append(errs, err)
 			}
 
@@ -417,14 +417,18 @@ func validateAdapterEndpoint(endpoint string, bidderName string, errs []error) [
 	return errs
 }
 
-func validateInfo(info BidderInfo, bidderName string) error {
-	if err := validateMaintainer(info.Maintainer, bidderName); err != nil {
+func validateInfo(bidder BidderInfo, infos BidderInfos, bidderName string) error {
+	if err := validateMaintainer(bidder.Maintainer, bidderName); err != nil {
 		return err
 	}
-	if err := validateCapabilities(info.Capabilities, bidderName); err != nil {
+	if err := validateCapabilities(bidder.Capabilities, bidderName); err != nil {
 		return err
 	}
-
+	if len(bidder.AliasOf) > 0 {
+		if err := validateAliasCapabilities(bidder, infos, bidderName); err != nil {
+			return err
+		}
+	}
 	return nil
 }
 
@@ -435,6 +439,52 @@ func validateMaintainer(info *MaintainerInfo, bidderName string) error {
 	return nil
 }
 
+func validateAliasCapabilities(aliasBidderInfo BidderInfo, infos BidderInfos, bidderName string) error {
+	parentBidder, parentFound := infos[aliasBidderInfo.AliasOf]
+	if !parentFound {
+		return fmt.Errorf("parent bidder: %s not found for an alias: %s", aliasBidderInfo.AliasOf, bidderName)
+	}
+
+	if aliasBidderInfo.Capabilities != nil {
+		if parentBidder.Capabilities == nil {
+			return fmt.Errorf("capabilities for alias: %s should be a subset of capabilities for parent bidder: %s", bidderName, aliasBidderInfo.AliasOf)
+		}
+
+		if (aliasBidderInfo.Capabilities.App != nil && parentBidder.Capabilities.App == nil) || (aliasBidderInfo.Capabilities.Site != nil && parentBidder.Capabilities.Site == nil) {
+			return fmt.Errorf("capabilities for alias: %s should be a subset of capabilities for parent bidder: %s", bidderName, aliasBidderInfo.AliasOf)
+		}
+
+		if aliasBidderInfo.Capabilities.Site != nil && parentBidder.Capabilities.Site != nil {
+			if err := isAliasPlatformInfoSubsetOfParent(*parentBidder.Capabilities.Site, *aliasBidderInfo.Capabilities.Site, bidderName, aliasBidderInfo.AliasOf); err != nil {
+				return err
+			}
+		}
+
+		if aliasBidderInfo.Capabilities.App != nil && parentBidder.Capabilities.App != nil {
+			if err := isAliasPlatformInfoSubsetOfParent(*parentBidder.Capabilities.App, *aliasBidderInfo.Capabilities.App, bidderName, aliasBidderInfo.AliasOf); err != nil {
+				return err
+			}
+		}
+	}
+
+	return nil
+}
+
+func isAliasPlatformInfoSubsetOfParent(parentInfo PlatformInfo, aliasInfo PlatformInfo, bidderName string, parentBidderName string) error {
+	parentMediaTypes := make(map[openrtb_ext.BidType]struct{})
+	for _, info := range parentInfo.MediaTypes {
+		parentMediaTypes[info] = struct{}{}
+	}
+
+	for _, info := range aliasInfo.MediaTypes {
+		if _, found := parentMediaTypes[info]; !found {
+			return fmt.Errorf("mediaTypes for alias: %s should be a subset of MediaTypes for parent bidder: %s", bidderName, parentBidderName)
+		}
+	}
+
+	return nil
+}
+
 func validateCapabilities(info *CapabilitiesInfo, bidderName string) error {
 	if info == nil {
 		return fmt.Errorf("missing required field: capabilities for adapter: %s", bidderName)
diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go
index 712c23d0..fb1dd69a 100755
--- a/exchange/adapter_builders.go
+++ b/exchange/adapter_builders.go
@@ -19,6 +19,7 @@ import (
 	"github.com/prebid/prebid-server/adapters/adot"
 	"github.com/prebid/prebid-server/adapters/adpone"
 	"github.com/prebid/prebid-server/adapters/adprime"
+	"github.com/prebid/prebid-server/adapters/adquery"
 	"github.com/prebid/prebid-server/adapters/adrino"
 	"github.com/prebid/prebid-server/adapters/adsinteractive"
 	"github.com/prebid/prebid-server/adapters/adtarget"
@@ -56,6 +57,7 @@ import (
 	"github.com/prebid/prebid-server/adapters/bmtm"
 	"github.com/prebid/prebid-server/adapters/boldwin"
 	"github.com/prebid/prebid-server/adapters/brave"
+	cadentaperturemx "github.com/prebid/prebid-server/adapters/cadent_aperture_mx"
 	"github.com/prebid/prebid-server/adapters/ccx"
 	"github.com/prebid/prebid-server/adapters/coinzilla"
 	"github.com/prebid/prebid-server/adapters/colossus"
@@ -74,7 +76,6 @@ import (
 	"github.com/prebid/prebid-server/adapters/dmx"
 	evolution "github.com/prebid/prebid-server/adapters/e_volution"
 	"github.com/prebid/prebid-server/adapters/emtv"
-	"github.com/prebid/prebid-server/adapters/emx_digital"
 	"github.com/prebid/prebid-server/adapters/engagebdr"
 	"github.com/prebid/prebid-server/adapters/eplanning"
 	"github.com/prebid/prebid-server/adapters/epom"
@@ -210,6 +211,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder {
 		openrtb_ext.BidderAdot:              adot.Builder,
 		openrtb_ext.BidderAdpone:            adpone.Builder,
 		openrtb_ext.BidderAdprime:           adprime.Builder,
+		openrtb_ext.BidderAdquery:           adquery.Builder,
 		openrtb_ext.BidderAdrino:            adrino.Builder,
 		openrtb_ext.BidderAdsinteractive:    adsinteractive.Builder,
 		openrtb_ext.BidderAdsyield:          limelightDigital.Builder,
@@ -248,7 +250,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder {
 		openrtb_ext.BidderBmtm:              bmtm.Builder,
 		openrtb_ext.BidderBoldwin:           boldwin.Builder,
 		openrtb_ext.BidderBrave:             brave.Builder,
-		openrtb_ext.BidderCadentApertureMX:  emx_digital.Builder,
+		openrtb_ext.BidderCadentApertureMX:  cadentaperturemx.Builder,
 		openrtb_ext.BidderCcx:               ccx.Builder,
 		openrtb_ext.BidderCoinzilla:         coinzilla.Builder,
 		openrtb_ext.BidderColossus:          colossus.Builder,
@@ -267,7 +269,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder {
 		openrtb_ext.BidderDianomi:           dianomi.Builder,
 		openrtb_ext.BidderDmx:               dmx.Builder,
 		openrtb_ext.BidderEmtv:              emtv.Builder,
-		openrtb_ext.BidderEmxDigital:        emx_digital.Builder,
+		openrtb_ext.BidderEmxDigital:        cadentaperturemx.Builder,
 		openrtb_ext.BidderEngageBDR:         engagebdr.Builder,
 		openrtb_ext.BidderEPlanning:         eplanning.Builder,
 		openrtb_ext.BidderEpom:              epom.Builder,
diff --git a/exchange/adapter_util.go b/exchange/adapter_util.go
index c863f52a..ee9a066a 100644
--- a/exchange/adapter_util.go
+++ b/exchange/adapter_util.go
@@ -43,6 +43,13 @@ func buildBidders(infos config.BidderInfos, builders map[openrtb_ext.BidderName]
 			continue
 		}
 
+		if len(info.AliasOf) > 0 {
+			if err := setAliasBuilder(info, builders, bidderName); err != nil {
+				errs = append(errs, fmt.Errorf("%v: failed to set alias builder: %v", bidder, err))
+				continue
+			}
+		}
+
 		builder, builderFound := builders[bidderName]
 		if !builderFound {
 			errs = append(errs, fmt.Errorf("%v: builder not registered", bidder))
@@ -63,6 +70,20 @@ func buildBidders(infos config.BidderInfos, builders map[openrtb_ext.BidderName]
 	return bidders, errs
 }
 
+func setAliasBuilder(info config.BidderInfo, builders map[openrtb_ext.BidderName]adapters.Builder, bidderName openrtb_ext.BidderName) error {
+	parentBidderName, parentBidderFound := openrtb_ext.NormalizeBidderName(info.AliasOf)
+	if !parentBidderFound {
+		return fmt.Errorf("unknown parent bidder: %v for alias: %v", info.AliasOf, bidderName)
+	}
+
+	builder, builderFound := builders[parentBidderName]
+	if !builderFound {
+		return fmt.Errorf("%v: parent builder not registered", parentBidderName)
+	}
+	builders[bidderName] = builder
+	return nil
+}
+
 func buildAdapterInfo(bidderInfo config.BidderInfo) config.Adapter {
 	adapter := config.Adapter{}
 	adapter.Endpoint = bidderInfo.Endpoint
diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go
index a9b1a888..bed2f056 100644
--- a/openrtb_ext/bidders.go
+++ b/openrtb_ext/bidders.go
@@ -36,6 +36,7 @@ var coreBidderNames []BidderName = []BidderName{
 	BidderAdot,
 	BidderAdpone,
 	BidderAdprime,
+	BidderAdquery,
 	BidderAdrino,
 	BidderAdsinteractive,
 	BidderAdsyield,
@@ -324,6 +325,7 @@ const (
 	BidderAdot              BidderName = "adot"
 	BidderAdpone            BidderName = "adpone"
 	BidderAdprime           BidderName = "adprime"
+	BidderAdquery           BidderName = "adquery"
 	BidderAdrino            BidderName = "adrino"
 	BidderAdsinteractive    BidderName = "adsinteractive"
 	BidderAdsyield          BidderName = "adsyield"
diff --git a/openrtb_ext/imp_adquery.go b/openrtb_ext/imp_adquery.go
new file mode 100644
index 00000000..73477e78
--- /dev/null
+++ b/openrtb_ext/imp_adquery.go
@@ -0,0 +1,6 @@
+package openrtb_ext
+
+type ImpExtAdQuery struct {
+	PlacementID string `json:"placementId"`
+	Type        string `json:"type"`
+}
diff --git a/openrtb_ext/imp_emx_digital.go b/openrtb_ext/imp_cadent_aperture_mx.go
similarity index 72%
rename from openrtb_ext/imp_emx_digital.go
rename to openrtb_ext/imp_cadent_aperture_mx.go
index 5c5956b1..fc4280ff 100644
--- a/openrtb_ext/imp_emx_digital.go
+++ b/openrtb_ext/imp_cadent_aperture_mx.go
@@ -1,6 +1,6 @@
 package openrtb_ext
 
-type ExtImpEmxDigital struct {
+type ExtImpCadentApertureMX struct {
 	TagID    string `json:"tagid"`
 	BidFloor string `json:"bidfloor,omitempty"`
 }
diff --git a/openrtb_ext/imp_flipp.go b/openrtb_ext/imp_flipp.go
index 029e2882..56874c02 100644
--- a/openrtb_ext/imp_flipp.go
+++ b/openrtb_ext/imp_flipp.go
@@ -6,7 +6,6 @@ type ImpExtFlipp struct {
 	SiteID                  int64              `json:"siteId"`
 	ZoneIds                 []int64            `json:"zoneIds,omitempty"`
 	UserKey                 string             `json:"userKey,omitempty"`
-	IP                      string             `json:"ip,omitempty"`
 	Options                 ImpExtFlippOptions `json:"options,omitempty"`
 }
 
diff --git a/static/bidder-info/adquery.yaml b/static/bidder-info/adquery.yaml
new file mode 100644
index 00000000..98b6b0ea
--- /dev/null
+++ b/static/bidder-info/adquery.yaml
@@ -0,0 +1,16 @@
+endpoint: "https://bidder.adquery.io/prebid/bid"
+maintainer:
+  email: prebid@adquery.io
+#endpointCompression: gzip # disabled because otherwise bidder responds with {data:null}
+gvlVendorID: 902
+capabilities:
+#  app: # disabled because currently it's only a site, not an app (?)
+#    mediaTypes:
+#      - banner
+  site:
+    mediaTypes:
+      - banner
+userSync:
+  redirect:
+    url: https://bidder.adquery.io/prebid/userSync?1=1&gdpr={{.GDPR}}&consent={{.GDPRConsent}}&ccpa_consent={{.USPrivacy}}&redirect={{.RedirectURL}}
+    userMacro: $UID
\ No newline at end of file
diff --git a/static/bidder-params/adquery.json b/static/bidder-params/adquery.json
new file mode 100644
index 00000000..f2394b5e
--- /dev/null
+++ b/static/bidder-params/adquery.json
@@ -0,0 +1,22 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "title": "Adquery Adapter Params",
+  "description": "A schema which validates params accepted by the Adquery adapter",
+  "type": "object",
+
+  "properties": {
+    "placementId": {
+      "type": "string",
+      "minLength": 35,
+      "maxLength": 45,
+      "description": "Placement ID"
+    },
+    "type": {
+      "type": "string",
+      "minLength": 1,
+      "description": "Bid type"
+    }
+  },
+
+  "required": ["placementId", "type"]
+}
diff --git a/static/bidder-params/emx_digital.json b/static/bidder-params/emx_digital.json
index f7516f57..42c243a9 100644
--- a/static/bidder-params/emx_digital.json
+++ b/static/bidder-params/emx_digital.json
@@ -1,7 +1,7 @@
 {
     "$schema": "http://json-schema.org/draft-04/schema#",
     "title": "EMX Digital Adapter Params",
-    "description": "A schema which validates params accepted by the EMX Digital adapter",
+    "description": "A schema which validates params accepted by the Cadent Aperture MX adapter",
     "type": "object",
     "properties": {
       "tagid" : {


Test patch:
diff --git a/adapters/adquery/adquery_test.go b/adapters/adquery/adquery_test.go
new file mode 100644
index 00000000..228d835d
--- /dev/null
+++ b/adapters/adquery/adquery_test.go
@@ -0,0 +1,20 @@
+package adquery
+
+import (
+	"github.com/prebid/prebid-server/adapters/adapterstest"
+	"github.com/prebid/prebid-server/config"
+	"github.com/prebid/prebid-server/openrtb_ext"
+	"testing"
+)
+
+func TestJsonSamples(t *testing.T) {
+	bidder, buildErr := Builder(openrtb_ext.BidderAdquery, config.Adapter{
+		Endpoint: "https://bidder.adquery.io/prebid/bid"},
+		config.Server{ExternalUrl: "http://hosturl.com", GvlID: 902, DataCenter: "2"})
+
+	if buildErr != nil {
+		t.Fatalf("Builder returned unexpected error %v", buildErr)
+	}
+
+	adapterstest.RunJSONBidderTest(t, "adquerytest", bidder)
+}
diff --git a/adapters/adquery/adquerytest/exemplary/empty.json b/adapters/adquery/adquerytest/exemplary/empty.json
new file mode 100644
index 00000000..04f1d21b
--- /dev/null
+++ b/adapters/adquery/adquerytest/exemplary/empty.json
@@ -0,0 +1,12 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "xyz"
+    },
+    "imp": [],
+    "bidder": "adquery"
+  },
+  "httpCalls": [],
+  "expectedBidResponses": []
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/exemplary/many-imps.json b/adapters/adquery/adquerytest/exemplary/many-imps.json
new file mode 100644
index 00000000..a3985c87
--- /dev/null
+++ b/adapters/adquery/adquerytest/exemplary/many-imps.json
@@ -0,0 +1,227 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+          "bidder": {
+            "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+            "type": "banner"
+          }
+        }
+      },{
+        "id": "2",
+        "tagid": "test-banner-imp-id-2",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+          "bidder": {
+            "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f898",
+            "type": "banner"
+          }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100,300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": {
+            "requestId": "22e26bd9a702bc1",
+            "emission_id": "22e26bd9a702bc1",
+            "eventTracker": "https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "externalEmissionCodes": "",
+            "impressionTracker": "https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "viewabilityTracker": "https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "clickTracker": "https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023",
+            "link": "https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023",
+            "logo": "https://api.adquery.io/img/adquery.png",
+            "medias": [
+              {
+                "src": "banner/2023-06-05/17591",
+                "ext": "zip",
+                "type": 3
+              }
+            ],
+            "domain": "https://bidder.adquery.io",
+            "urlAdq": "https://adquery.io",
+            "creationId": 7211,
+            "currency": "EUR",
+            "adDomains": [
+              "https://s1.adquery.io"
+            ],
+            "tag": "<ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adqLib": "https://api.adquery.io/js/adquery-0.1.js?time=10",
+            "mediaType": {
+              "width": "320",
+              "height": "50",
+              "name": "banner",
+              "type": "banner320x50"
+            },
+            "cpm": "4.14",
+            "qid": "fc08aacb07eac44421ed",
+            "width": "320",
+            "height": "50",
+            "isExpand": false
+          }
+        }
+      }
+    },{
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id-2",
+          "bidId": "22e26bd9a702bc2",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f898",
+          "sizes": "300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": {
+            "requestId": "22e26bd9a702bc2",
+            "emission_id": "22e26bd9a702bc2",
+            "eventTracker": "https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "externalEmissionCodes": "",
+            "impressionTracker": "https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "viewabilityTracker": "https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "clickTracker": "https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023",
+            "link": "https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023",
+            "logo": "https://api.adquery.io/img/adquery.png",
+            "medias": [
+              {
+                "src": "banner/2023-06-05/17591",
+                "ext": "zip",
+                "type": 3
+              }
+            ],
+            "domain": "https://bidder.adquery.io",
+            "urlAdq": "https://adquery.io",
+            "creationId": 7211,
+            "currency": "EUR",
+            "adDomains": [
+              "https://s1.adquery.io"
+            ],
+            "tag": "<ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adqLib": "https://api.adquery.io/js/adquery-0.1.js?time=10",
+            "mediaType": {
+              "width": "320",
+              "height": "50",
+              "name": "banner",
+              "type": "banner320x50"
+            },
+            "cpm": "4.14",
+            "qid": "fc08aacb07eac44421ed",
+            "width": "320",
+            "height": "50",
+            "isExpand": false
+          }
+        }
+      }
+    }
+  ],
+  "expectedBidResponses": [
+    {
+      "currency": "EUR",
+      "bids": [
+        {
+          "bid": {
+            "id": "22e26bd9a702bc1",
+            "impid": "1",
+            "price": 4.14,
+            "adm": "<script src=\"https://api.adquery.io/js/adquery-0.1.js?time=10\"></script><ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adomain": ["https://s1.adquery.io"],
+            "crid": "7211",
+            "w": 320,
+            "h": 50
+          },
+          "type": "banner"
+        }
+      ]
+    },
+    {
+      "currency": "EUR",
+      "bids": [
+        {
+          "bid": {
+            "id": "22e26bd9a702bc2",
+            "impid": "2",
+            "price": 4.14,
+            "adm": "<script src=\"https://api.adquery.io/js/adquery-0.1.js?time=10\"></script><ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adomain": ["https://s1.adquery.io"],
+            "crid": "7211",
+            "w": 320,
+            "h": 50
+          },
+          "type": "banner"
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/exemplary/no-currency.json b/adapters/adquery/adquerytest/exemplary/no-currency.json
new file mode 100644
index 00000000..e97e4b9b
--- /dev/null
+++ b/adapters/adquery/adquerytest/exemplary/no-currency.json
@@ -0,0 +1,123 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+            "bidder": {
+                "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+                "type": "banner"
+            }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100,300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": {
+            "requestId": "22e26bd9a702bc1",
+            "emission_id": "22e26bd9a702bc1",
+            "eventTracker": "https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "externalEmissionCodes": "",
+            "impressionTracker": "https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "viewabilityTracker": "https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "clickTracker": "https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023",
+            "link": "https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023",
+            "logo": "https://api.adquery.io/img/adquery.png",
+            "medias": [
+              {
+                "src": "banner/2023-06-05/17591",
+                "ext": "zip",
+                "type": 3
+              }
+            ],
+            "domain": "https://bidder.adquery.io",
+            "urlAdq": "https://adquery.io",
+            "creationId": 7211,
+            "adDomains": [
+              "https://s1.adquery.io"
+            ],
+            "tag": "<ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adqLib": "https://api.adquery.io/js/adquery-0.1.js?time=10",
+            "mediaType": {
+              "width": "320",
+              "height": "50",
+              "name": "banner",
+              "type": "banner320x50"
+            },
+            "cpm": "4.14",
+            "qid": "fc08aacb07eac44421ed",
+            "width": "320",
+            "height": "50",
+            "isExpand": false
+          }
+        }
+      }
+    }
+  ],
+  "expectedBidResponses": [
+    {
+      "currency": "PLN",
+      "bids": [
+        {
+          "bid": {
+            "id": "22e26bd9a702bc1",
+            "impid": "1",
+            "price": 4.14,
+            "adm": "<script src=\"https://api.adquery.io/js/adquery-0.1.js?time=10\"></script><ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adomain": ["https://s1.adquery.io"],
+            "crid": "7211",
+            "w": 320,
+            "h": 50
+          },
+          "type": "banner"
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/exemplary/ok.json b/adapters/adquery/adquerytest/exemplary/ok.json
new file mode 100644
index 00000000..e725e055
--- /dev/null
+++ b/adapters/adquery/adquerytest/exemplary/ok.json
@@ -0,0 +1,124 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+            "bidder": {
+                "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+                "type": "banner"
+            }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100,300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": {
+            "requestId": "22e26bd9a702bc1",
+            "emission_id": "22e26bd9a702bc1",
+            "eventTracker": "https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "externalEmissionCodes": "",
+            "impressionTracker": "https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "viewabilityTracker": "https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "clickTracker": "https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023",
+            "link": "https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023",
+            "logo": "https://api.adquery.io/img/adquery.png",
+            "medias": [
+              {
+                "src": "banner/2023-06-05/17591",
+                "ext": "zip",
+                "type": 3
+              }
+            ],
+            "domain": "https://bidder.adquery.io",
+            "urlAdq": "https://adquery.io",
+            "creationId": 7211,
+            "currency": "EUR",
+            "adDomains": [
+              "https://s1.adquery.io"
+            ],
+            "tag": "<ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adqLib": "https://api.adquery.io/js/adquery-0.1.js?time=10",
+            "mediaType": {
+              "width": "320",
+              "height": "50",
+              "name": "banner",
+              "type": "banner320x50"
+            },
+            "cpm": "4.14",
+            "qid": "fc08aacb07eac44421ed",
+            "width": "320",
+            "height": "50",
+            "isExpand": false
+          }
+        }
+      }
+    }
+  ],
+  "expectedBidResponses": [
+    {
+      "currency": "EUR",
+      "bids": [
+        {
+          "bid": {
+            "id": "22e26bd9a702bc1",
+            "impid": "1",
+            "price": 4.14,
+            "adm": "<script src=\"https://api.adquery.io/js/adquery-0.1.js?time=10\"></script><ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adomain": ["https://s1.adquery.io"],
+            "crid": "7211",
+            "w": 320,
+            "h": 50
+          },
+          "type": "banner"
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/exemplary/single-imp-banner-format.json b/adapters/adquery/adquerytest/exemplary/single-imp-banner-format.json
new file mode 100644
index 00000000..7a0092d5
--- /dev/null
+++ b/adapters/adquery/adquerytest/exemplary/single-imp-banner-format.json
@@ -0,0 +1,115 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "w": 320,
+          "h": 100
+        },
+        "ext": {
+          "bidder": {
+            "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+            "type": "banner"
+          }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": {
+            "requestId": "22e26bd9a702bc1",
+            "emission_id": "22e26bd9a702bc1",
+            "eventTracker": "https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "externalEmissionCodes": "",
+            "impressionTracker": "https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "viewabilityTracker": "https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "clickTracker": "https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023",
+            "link": "https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023",
+            "logo": "https://api.adquery.io/img/adquery.png",
+            "medias": [
+              {
+                "src": "banner/2023-06-05/17591",
+                "ext": "zip",
+                "type": 3
+              }
+            ],
+            "domain": "https://bidder.adquery.io",
+            "urlAdq": "https://adquery.io",
+            "creationId": 7211,
+            "currency": "PLN",
+            "adDomains": [
+              "https://s1.adquery.io"
+            ],
+            "tag": "<ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adqLib": "https://api.adquery.io/js/adquery-0.1.js?time=10",
+            "mediaType": {
+              "width": "320",
+              "height": "50",
+              "name": "banner",
+              "type": "banner320x50"
+            },
+            "cpm": "4.14",
+            "qid": "fc08aacb07eac44421ed",
+            "width": "320",
+            "height": "50",
+            "isExpand": false
+          }
+        }
+      }
+    }
+  ],
+  "expectedBidResponses": [
+    {
+      "bids": [
+        {
+          "bid": {
+            "id": "22e26bd9a702bc1",
+            "impid": "1",
+            "price": 4.14,
+            "adm": "<script src=\"https://api.adquery.io/js/adquery-0.1.js?time=10\"></script><ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adomain": ["https://s1.adquery.io"],
+            "crid": "7211",
+            "w": 320,
+            "h": 50
+          },
+          "type": "banner"
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/supplemental/data-null.json b/adapters/adquery/adquerytest/supplemental/data-null.json
new file mode 100644
index 00000000..0d21a2bd
--- /dev/null
+++ b/adapters/adquery/adquerytest/supplemental/data-null.json
@@ -0,0 +1,72 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+          "bidder": {
+            "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+            "type": "banner"
+          }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100,300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": null
+        }
+      }
+    }
+  ],
+  "expectedBidResponses": [
+    {
+      "bids": []
+    }
+  ]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/supplemental/invalid-numerical-values.json b/adapters/adquery/adquerytest/supplemental/invalid-numerical-values.json
new file mode 100644
index 00000000..daff3d08
--- /dev/null
+++ b/adapters/adquery/adquerytest/supplemental/invalid-numerical-values.json
@@ -0,0 +1,114 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+            "bidder": {
+                "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+                "type": "banner"
+            }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100,300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": {
+            "requestId": "22e26bd9a702bc",
+            "emission_id": "22e26bd9a702bc",
+            "eventTracker": "https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "externalEmissionCodes": "",
+            "impressionTracker": "https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "viewabilityTracker": "https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "clickTracker": "https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023",
+            "link": "https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023",
+            "logo": "https://api.adquery.io/img/adquery.png",
+            "medias": [
+              {
+                "src": "banner/2023-06-05/17591",
+                "ext": "zip",
+                "type": 3
+              }
+            ],
+            "domain": "https://bidder.adquery.io",
+            "urlAdq": "https://adquery.io",
+            "creationId": 7211,
+            "currency": "PLN",
+            "adDomains": [
+              "https://s1.adquery.io"
+            ],
+            "tag": "<ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adqLib": "https://api.adquery.io/js/adquery-0.1.js?time=10",
+            "mediaType": {
+              "width": "320px",
+              "height": "50px",
+              "name": "banner",
+              "type": "banner320x50"
+            },
+            "cpm": "$4.14",
+            "qid": "fc08aacb07eac44421ed",
+            "width": "320",
+            "height": "50",
+            "isExpand": false
+          }
+        }
+      }
+    }
+  ],
+  "expectedMakeBidsErrors": [{
+    "value": "strconv.ParseFloat: parsing \"$4.14\": invalid syntax",
+    "comparison": "literal"
+  },{
+    "value": "strconv.ParseInt: parsing \"320px\": invalid syntax",
+    "comparison": "literal"
+  },{
+    "value": "strconv.ParseInt: parsing \"50px\": invalid syntax",
+    "comparison": "literal"
+  }]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/supplemental/malformed-ext.json b/adapters/adquery/adquerytest/supplemental/malformed-ext.json
new file mode 100644
index 00000000..46aaaed4
--- /dev/null
+++ b/adapters/adquery/adquerytest/supplemental/malformed-ext.json
@@ -0,0 +1,38 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+          "bidder": {
+            "placementId": [],
+            "type": "banner"
+          }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "expectedMakeRequestsErrors": [{
+    "value": "json: cannot unmarshal array into Go struct field ImpExtAdQuery.placementId of type string",
+    "comparison": "literal"
+  }]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/supplemental/malformed-resp.json b/adapters/adquery/adquerytest/supplemental/malformed-resp.json
new file mode 100644
index 00000000..f7aa271e
--- /dev/null
+++ b/adapters/adquery/adquerytest/supplemental/malformed-resp.json
@@ -0,0 +1,108 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+            "bidder": {
+                "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+                "type": "banner"
+            }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100,300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": {
+            "requestId": "22e26bd9a702bc",
+            "emission_id": "22e26bd9a702bc",
+            "eventTracker": "https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "externalEmissionCodes": "",
+            "impressionTracker": "https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "viewabilityTracker": "https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "clickTracker": "https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023",
+            "link": "https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023",
+            "logo": "https://api.adquery.io/img/adquery.png",
+            "medias": [
+              {
+                "src": "banner/2023-06-05/17591",
+                "ext": "zip",
+                "type": 3
+              }
+            ],
+            "domain": "https://bidder.adquery.io",
+            "urlAdq": "https://adquery.io",
+            "creationId": "string-identifier",
+            "currency": "PLN",
+            "adDomains": [
+              "https://s1.adquery.io"
+            ],
+            "tag": "<ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adqLib": "https://api.adquery.io/js/adquery-0.1.js?time=10",
+            "mediaType": {
+              "width": "320",
+              "height": "50",
+              "name": "banner",
+              "type": "banner320x50"
+            },
+            "cpm": "4.14",
+            "qid": "fc08aacb07eac44421ed",
+            "width": "320",
+            "height": "50",
+            "isExpand": false
+          }
+        }
+      }
+    }
+  ],
+  "expectedMakeBidsErrors": [{
+    "value": "json: cannot unmarshal string into Go struct field ResponseData.data.creationId of type int64",
+    "comparison": "literal"
+  }]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/supplemental/mediatype-unknown.json b/adapters/adquery/adquerytest/supplemental/mediatype-unknown.json
new file mode 100644
index 00000000..bf3cdc63
--- /dev/null
+++ b/adapters/adquery/adquerytest/supplemental/mediatype-unknown.json
@@ -0,0 +1,108 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+            "bidder": {
+                "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+                "type": "banner"
+            }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100,300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": {
+            "requestId": "22e26bd9a702bc",
+            "emission_id": "22e26bd9a702bc",
+            "eventTracker": "https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "externalEmissionCodes": "",
+            "impressionTracker": "https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "viewabilityTracker": "https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "clickTracker": "https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023",
+            "link": "https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023",
+            "logo": "https://api.adquery.io/img/adquery.png",
+            "medias": [
+              {
+                "src": "banner/2023-06-05/17591",
+                "ext": "zip",
+                "type": 3
+              }
+            ],
+            "domain": "https://bidder.adquery.io",
+            "urlAdq": "https://adquery.io",
+            "creationId": 7211,
+            "currency": "PLN",
+            "adDomains": [
+              "https://s1.adquery.io"
+            ],
+            "tag": "<ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adqLib": "https://api.adquery.io/js/adquery-0.1.js?time=10",
+            "mediaType": {
+              "width": "320",
+              "height": "50",
+              "name": "unknown",
+              "type": "unknown320x50"
+            },
+            "cpm": "4.14",
+            "qid": "fc08aacb07eac44421ed",
+            "width": "320",
+            "height": "50",
+            "isExpand": false
+          }
+        }
+      }
+    }
+  ],
+  "expectedMakeBidsErrors": [{
+    "value": "unsupported MediaType: unknown",
+    "comparison": "literal"
+  }]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/supplemental/mediatype-video.json b/adapters/adquery/adquerytest/supplemental/mediatype-video.json
new file mode 100644
index 00000000..7becebab
--- /dev/null
+++ b/adapters/adquery/adquerytest/supplemental/mediatype-video.json
@@ -0,0 +1,108 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+            "bidder": {
+                "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+                "type": "banner"
+            }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100,300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": {
+            "requestId": "22e26bd9a702bc",
+            "emission_id": "22e26bd9a702bc",
+            "eventTracker": "https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "externalEmissionCodes": "",
+            "impressionTracker": "https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "viewabilityTracker": "https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1",
+            "clickTracker": "https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023",
+            "link": "https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023",
+            "logo": "https://api.adquery.io/img/adquery.png",
+            "medias": [
+              {
+                "src": "banner/2023-06-05/17591",
+                "ext": "zip",
+                "type": 3
+              }
+            ],
+            "domain": "https://bidder.adquery.io",
+            "urlAdq": "https://adquery.io",
+            "creationId": 7211,
+            "currency": "PLN",
+            "adDomains": [
+              "https://s1.adquery.io"
+            ],
+            "tag": "<ad-adquery-prebid data-qid=\"fc08aacb07eac44421ed\" data-type=\"banner320x50\" data-width=\"320\" date-height=\"50\" data-placement=\"d30f79cf7fef47bd7a5611719f936539bec0d2e9\" data-eventTracker=\"https://bidder.adquery.io/prebid/ev/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-externalEmissionCodes=\"\" data-impressionTracker=\"https://bidder.adquery.io/prebid/im/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-viewabilityTracker=\"https://bidder.adquery.io/prebid/vi/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?ad=1\" data-clickTracker=\"https://bidder.adquery.io/prebid/cl/d30f79cf7fef47bd7a5611719f936539bec0d2e9/22e26bd9a702bc?url=https%3A%2F%2Fbrodacid.pl%2F%3Futm_source%3Dmobile_open%26utm_medium%3Dcpc%26utm_campaign%3Dhi2023\" data-link=\"https://brodacid.pl/?utm_source=mobile_open&utm_medium=cpc&utm_campaign=hi2023\" data-src=\"banner/2023-06-05/17591\" data-ext=\"zip\" data-media-type=\"3\" data-isExpand=\"\" data-domain=\"https://bidder.adquery.io\"  data-isVideoFloating=\"\" data-content=\"\" data-creationType=\"16\"> </ad-adquery>",
+            "adqLib": "https://api.adquery.io/js/adquery-0.1.js?time=10",
+            "mediaType": {
+              "width": "320",
+              "height": "50",
+              "name": "video",
+              "type": "video320x50"
+            },
+            "cpm": "4.14",
+            "qid": "fc08aacb07eac44421ed",
+            "width": "320",
+            "height": "50",
+            "isExpand": false
+          }
+        }
+      }
+    }
+  ],
+  "expectedMakeBidsErrors": [{
+    "value": "unsupported MediaType: video",
+    "comparison": "literal"
+  }]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/supplemental/no-imp-banner-measures.json b/adapters/adquery/adquerytest/supplemental/no-imp-banner-measures.json
new file mode 100644
index 00000000..953d6de5
--- /dev/null
+++ b/adapters/adquery/adquerytest/supplemental/no-imp-banner-measures.json
@@ -0,0 +1,61 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {},
+        "ext": {
+          "bidder": {
+            "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+            "type": "banner"
+          }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": null
+        }
+      }
+    }
+  ],
+  "expectedBidResponses": [
+    {
+      "bids": []
+    }
+  ]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/supplemental/no-imp-banner.json b/adapters/adquery/adquerytest/supplemental/no-imp-banner.json
new file mode 100644
index 00000000..8589d97f
--- /dev/null
+++ b/adapters/adquery/adquerytest/supplemental/no-imp-banner.json
@@ -0,0 +1,60 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "ext": {
+          "bidder": {
+            "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+            "type": "banner"
+          }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "headers": {},
+        "body": {
+          "data": null
+        }
+      }
+    }
+  ],
+  "expectedBidResponses": [
+    {
+      "bids": []
+    }
+  ]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/supplemental/resp-bad-request.json b/adapters/adquery/adquerytest/supplemental/resp-bad-request.json
new file mode 100644
index 00000000..cb869625
--- /dev/null
+++ b/adapters/adquery/adquerytest/supplemental/resp-bad-request.json
@@ -0,0 +1,68 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+            "bidder": {
+                "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+                "type": "banner"
+            }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100,300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 400,
+        "headers": {}
+      }
+    }
+  ],
+  "expectedMakeBidsErrors": [{
+    "value": "Unexpected status code: 400. Run with request.debug = 1 for more info",
+    "comparison": "literal"
+  }]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/supplemental/resp-no-content.json b/adapters/adquery/adquerytest/supplemental/resp-no-content.json
new file mode 100644
index 00000000..5817e15a
--- /dev/null
+++ b/adapters/adquery/adquerytest/supplemental/resp-no-content.json
@@ -0,0 +1,66 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+            "bidder": {
+                "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+                "type": "banner"
+            }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100,300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 204,
+        "headers": {}
+      }
+    }
+  ],
+  "expectedBidResponses": [
+  ]
+}
\ No newline at end of file
diff --git a/adapters/adquery/adquerytest/supplemental/resp-server-error.json b/adapters/adquery/adquerytest/supplemental/resp-server-error.json
new file mode 100644
index 00000000..05c1cae8
--- /dev/null
+++ b/adapters/adquery/adquerytest/supplemental/resp-server-error.json
@@ -0,0 +1,68 @@
+{
+  "mockBidRequest": {
+    "id": "22e26bd9a702bc",
+    "user": {
+      "id": "d93f2a0e5f0fe2cc3a6e"
+    },
+    "imp": [
+      {
+        "id": "1",
+        "tagid": "test-banner-imp-id",
+        "bidder": "adquery",
+        "banner": {
+          "format": [
+            {
+              "w": 320,
+              "h": 100
+            },
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+            "bidder": {
+                "placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+                "type": "banner"
+            }
+        }
+      }
+    ],
+    "bidder": "adquery"
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://bidder.adquery.io/prebid/bid",
+        "headers": {
+          "Accept": ["application/json"],
+          "Content-Type": ["application/json;charset=utf-8"],
+          "X-Openrtb-Version": ["2.5"]
+        },
+        "body": {
+          "adUnitCode": "test-banner-imp-id",
+          "bidId": "22e26bd9a702bc1",
+          "bidQid": "d93f2a0e5f0fe2cc3a6e",
+          "bidPageUrl": "",
+          "bidder": "adquery",
+          "bidderRequestId": "22e26bd9a702bc",
+          "bidRequestsCount":  1,
+          "bidderRequestsCount": 1,
+          "placementCode": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897",
+          "sizes": "320x100,300x250",
+          "type": "banner",
+          "v": "server"
+        }
+      },
+      "mockResponse": {
+        "status": 500,
+        "headers": {}
+      }
+    }
+  ],
+  "expectedMakeBidsErrors": [{
+    "value": "Unexpected status code: 500. Run with request.debug = 1 for more info",
+    "comparison": "literal"
+  }]
+}
\ No newline at end of file
diff --git a/adapters/adquery/params_test.go b/adapters/adquery/params_test.go
new file mode 100644
index 00000000..cba02100
--- /dev/null
+++ b/adapters/adquery/params_test.go
@@ -0,0 +1,49 @@
+package adquery
+
+import (
+	"encoding/json"
+	"testing"
+
+	"github.com/prebid/prebid-server/openrtb_ext"
+)
+
+func TestValidParams(t *testing.T) {
+	validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params")
+	if err != nil {
+		t.Fatalf("Failed to fetch the json schema. %v", err)
+	}
+
+	for _, p := range validParams {
+		if err := validator.Validate(openrtb_ext.BidderAdquery, json.RawMessage(p)); err != nil {
+			t.Errorf("Schema rejected valid params: %s", p)
+		}
+	}
+}
+
+func TestInvalidParams(t *testing.T) {
+	validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params")
+	if err != nil {
+		t.Fatalf("Failed to fetch the json schema. %v", err)
+	}
+
+	for _, p := range invalidParams {
+		if err := validator.Validate(openrtb_ext.BidderAdquery, json.RawMessage(p)); err == nil {
+			t.Errorf("Schema allowed invalid params: %s", p)
+		}
+	}
+}
+
+var validParams = []string{
+	`{"placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897", "type": "banner300x250"}`,
+}
+
+var invalidParams = []string{
+	`{}`,
+	`{"placementId": 42}`,
+	`{"type": 3}`,
+	`{"placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897"}`,
+	`{"type": "banner"}`,
+	`{"placementId": 42, "type": "banner"}`,
+	`{"placementId": "too_short", "type": "banner"}`,
+	`{"placementId": "6d93f2a0e5f0fe2cc3a6e9e3ade964b43b07f897", "type": ""}`,
+}
diff --git a/adapters/emx_digital/emx_digitaltest/exemplary/banner-and-video-app.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/banner-and-video-app.json
similarity index 69%
rename from adapters/emx_digital/emx_digitaltest/exemplary/banner-and-video-app.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/banner-and-video-app.json
index 46c469b9..255174e2 100644
--- a/adapters/emx_digital/emx_digitaltest/exemplary/banner-and-video-app.json
+++ b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/banner-and-video-app.json
@@ -133,7 +133,7 @@
             {
               "seat": "12356",
               "bid": [{
-                "adm": "<div id=\"emximp\"><script>var adm='\\<script\\ src\\=\\'https\\:\\/\\/presentation\\-atl1\\.turn\\.com\\/server\\/ads\\.js\\?code\\=180858515\\&aid\\=49508660\\&tuid\\=3697246472959142409\\&duid\\=3592248512493872937\\&dt\\=a\\&uimpd\\=1OB0KmixN8sHuJc8RPFjxbSZrYW2YZcBuHKg\\-pD5EUJnlrGZTGPpxpl3uYcBYQ7GO937FCfn8dB72mF1jiGRToh8X_UEdA5MP\\-U6ORPQsQ8hmQV0VpZDR7yCaVRZu\\-I8GC4aswLJKm1ehJk2JLqoR8fNGOTt5N02R4_bafcFcCDQehYt_oMETehbgQUsGUuJOUrv\\-rRl46jWaNxtTjLFx01U8qDhPdLKvi2iEiNPYp2pLFfly7qg\\-pjrs0yN8zASsoG5g0qWiuyTjJKZ62irD5SLwF4jQYBxaXIFyF\\-pGADUX2GD6JPzOK9mLaWdX\\-N_fB9gUj8TnVS0WHJ5XJWnCMijjO4qguAQo7LiUftTOQZ66OhXUiNcdI55yMwK0uS_fo2FyHMj2JXiOVpZaJHnWE\\-9QOR3F1E4D9qv9EpOMFAwH1kJqoY\\-G3CBJWC_zUjizw2diGrctqk_tJ9b0jujUs_LmoarsIJcKdWBQoF4xfCjfO7DyaM4l0SBbwLA07GYz0tdDtMd7hbstccVk0PPPVNTOv\\-Pan6yUSHX\\-r\\-U7yDLcFLWxwEaapCh_mKwrATp9oJuOXuK0oIioxIIX9n4raGZPHkl27AX1stb2eIpawf5FkEnwY5YrYIiycI38zuqVAE2ZoI\\-Rn0l8Uckhf1zurAgg6_4AjqZp8oi26jsIHbIc5IsI\\-9UoAoJR_nv_gTojvepaSsA97RYysgopxAW_YzeixMr0LJTvo53DFh4WzrcgaMMPXPf79kdetKmcjPBTPC3bhu9BgI4zAdSobLNCH5BYV1aUcv80K3a1WD7cDZtUXckjWnHt\\-JdzFutuwFnNn66YqhPRxbuWKrW\\-grBHm4T2xv0NxEQIEJxnExroXYCEsPmcki2QTLHbo1fSPgqMF5U4fnfq3\\-3MwNKhtpT4\\-iZN1mzvqeTZPD7TdBWee7k1JXOO_PRyRtwQXaDPQy3HPPvGlRnin_bp26aHCP13HKhn63gh4unBlH7R1xgw0KeaYeBt6C_J9EnIgJQrbpHpwZK0LpM1GSqZ20CbfV891w\\&acp\\=\\$\\{EMX_MACRO\\}\\'\\>\\<\\/script\\><script src=\"https://imp.emxdgt.com/imp/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720\"><\\/script>'; window.vc= 'https://imp.emxdgt.com/view/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720';  var ap=\"${AUCTION_PRICE}\";var rf=document.domain; window.cp=\"0.36666\";  if(ap == \"test=1\" || ap == \"AUDIT\" || rf == \"s3.amazonaws.com\"){var  finaladm=adm.replace(/\\${EMX_MACRO}/g,\"AUDIT\"); window.audit =  true;}else{var  finaladm=finaladm=adm.replace(/\\${EMX_MACRO}/g,window.cp);}finaladm=finaladm.replace(/\\${RF_MACRO}/g,rf);try{document.write(decodeURI(finaladm));}catch(e){document.write(unescape(finaladm));};</script><script   src=\"https://js.brealtime.com/openvv.js\"></script></div>",
+                "adm": "<div id=\"cadentimp\"><script>var adm='\\<script\\ src\\=\\'https\\:\\/\\/presentation\\-atl1\\.turn\\.com\\/server\\/ads\\.js\\?code\\=180858515\\&aid\\=49508660\\&tuid\\=3697246472959142409\\&duid\\=3592248512493872937\\&dt\\=a\\&uimpd\\=1OB0KmixN8sHuJc8RPFjxbSZrYW2YZcBuHKg\\-pD5EUJnlrGZTGPpxpl3uYcBYQ7GO937FCfn8dB72mF1jiGRToh8X_UEdA5MP\\-U6ORPQsQ8hmQV0VpZDR7yCaVRZu\\-I8GC4aswLJKm1ehJk2JLqoR8fNGOTt5N02R4_bafcFcCDQehYt_oMETehbgQUsGUuJOUrv\\-rRl46jWaNxtTjLFx01U8qDhPdLKvi2iEiNPYp2pLFfly7qg\\-pjrs0yN8zASsoG5g0qWiuyTjJKZ62irD5SLwF4jQYBxaXIFyF\\-pGADUX2GD6JPzOK9mLaWdX\\-N_fB9gUj8TnVS0WHJ5XJWnCMijjO4qguAQo7LiUftTOQZ66OhXUiNcdI55yMwK0uS_fo2FyHMj2JXiOVpZaJHnWE\\-9QOR3F1E4D9qv9EpOMFAwH1kJqoY\\-G3CBJWC_zUjizw2diGrctqk_tJ9b0jujUs_LmoarsIJcKdWBQoF4xfCjfO7DyaM4l0SBbwLA07GYz0tdDtMd7hbstccVk0PPPVNTOv\\-Pan6yUSHX\\-r\\-U7yDLcFLWxwEaapCh_mKwrATp9oJuOXuK0oIioxIIX9n4raGZPHkl27AX1stb2eIpawf5FkEnwY5YrYIiycI38zuqVAE2ZoI\\-Rn0l8Uckhf1zurAgg6_4AjqZp8oi26jsIHbIc5IsI\\-9UoAoJR_nv_gTojvepaSsA97RYysgopxAW_YzeixMr0LJTvo53DFh4WzrcgaMMPXPf79kdetKmcjPBTPC3bhu9BgI4zAdSobLNCH5BYV1aUcv80K3a1WD7cDZtUXckjWnHt\\-JdzFutuwFnNn66YqhPRxbuWKrW\\-grBHm4T2xv0NxEQIEJxnExroXYCEsPmcki2QTLHbo1fSPgqMF5U4fnfq3\\-3MwNKhtpT4\\-iZN1mzvqeTZPD7TdBWee7k1JXOO_PRyRtwQXaDPQy3HPPvGlRnin_bp26aHCP13HKhn63gh4unBlH7R1xgw0KeaYeBt6C_J9EnIgJQrbpHpwZK0LpM1GSqZ20CbfV891w\\&acp\\=\\$\\{EMX_MACRO\\}\\'\\>\\<\\/script\\><script src=\"https://imp.emxdgt.com/imp/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720\"><\\/script>'; window.vc= 'https://imp.emxdgt.com/view/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720';  var ap=\"${AUCTION_PRICE}\";var rf=document.domain; window.cp=\"0.36666\";  if(ap == \"test=1\" || ap == \"AUDIT\" || rf == \"s3.amazonaws.com\"){var  finaladm=adm.replace(/\\${EMX_MACRO}/g,\"AUDIT\"); window.audit =  true;}else{var  finaladm=finaladm=adm.replace(/\\${EMX_MACRO}/g,window.cp);}finaladm=finaladm.replace(/\\${RF_MACRO}/g,rf);try{document.write(decodeURI(finaladm));}catch(e){document.write(unescape(finaladm));};</script><script   src=\"https://js.brealtime.com/openvv.js\"></script></div>",
                 "id": "some_test_ad_id_1",
                 "impid": "some_test_ad_id_1",
                 "ttl": 300,
@@ -168,7 +168,7 @@
     {
       "bids": [{
         "bid": {
-          "adm": "<div id=\"emximp\"><script>var adm='\\<script\\ src\\=\\'https\\:\\/\\/presentation\\-atl1\\.turn\\.com\\/server\\/ads\\.js\\?code\\=180858515\\&aid\\=49508660\\&tuid\\=3697246472959142409\\&duid\\=3592248512493872937\\&dt\\=a\\&uimpd\\=1OB0KmixN8sHuJc8RPFjxbSZrYW2YZcBuHKg\\-pD5EUJnlrGZTGPpxpl3uYcBYQ7GO937FCfn8dB72mF1jiGRToh8X_UEdA5MP\\-U6ORPQsQ8hmQV0VpZDR7yCaVRZu\\-I8GC4aswLJKm1ehJk2JLqoR8fNGOTt5N02R4_bafcFcCDQehYt_oMETehbgQUsGUuJOUrv\\-rRl46jWaNxtTjLFx01U8qDhPdLKvi2iEiNPYp2pLFfly7qg\\-pjrs0yN8zASsoG5g0qWiuyTjJKZ62irD5SLwF4jQYBxaXIFyF\\-pGADUX2GD6JPzOK9mLaWdX\\-N_fB9gUj8TnVS0WHJ5XJWnCMijjO4qguAQo7LiUftTOQZ66OhXUiNcdI55yMwK0uS_fo2FyHMj2JXiOVpZaJHnWE\\-9QOR3F1E4D9qv9EpOMFAwH1kJqoY\\-G3CBJWC_zUjizw2diGrctqk_tJ9b0jujUs_LmoarsIJcKdWBQoF4xfCjfO7DyaM4l0SBbwLA07GYz0tdDtMd7hbstccVk0PPPVNTOv\\-Pan6yUSHX\\-r\\-U7yDLcFLWxwEaapCh_mKwrATp9oJuOXuK0oIioxIIX9n4raGZPHkl27AX1stb2eIpawf5FkEnwY5YrYIiycI38zuqVAE2ZoI\\-Rn0l8Uckhf1zurAgg6_4AjqZp8oi26jsIHbIc5IsI\\-9UoAoJR_nv_gTojvepaSsA97RYysgopxAW_YzeixMr0LJTvo53DFh4WzrcgaMMPXPf79kdetKmcjPBTPC3bhu9BgI4zAdSobLNCH5BYV1aUcv80K3a1WD7cDZtUXckjWnHt\\-JdzFutuwFnNn66YqhPRxbuWKrW\\-grBHm4T2xv0NxEQIEJxnExroXYCEsPmcki2QTLHbo1fSPgqMF5U4fnfq3\\-3MwNKhtpT4\\-iZN1mzvqeTZPD7TdBWee7k1JXOO_PRyRtwQXaDPQy3HPPvGlRnin_bp26aHCP13HKhn63gh4unBlH7R1xgw0KeaYeBt6C_J9EnIgJQrbpHpwZK0LpM1GSqZ20CbfV891w\\&acp\\=\\$\\{EMX_MACRO\\}\\'\\>\\<\\/script\\><script src=\"https://imp.emxdgt.com/imp/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720\"><\\/script>'; window.vc= 'https://imp.emxdgt.com/view/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720';  var ap=\"${AUCTION_PRICE}\";var rf=document.domain; window.cp=\"0.36666\";  if(ap == \"test=1\" || ap == \"AUDIT\" || rf == \"s3.amazonaws.com\"){var  finaladm=adm.replace(/\\${EMX_MACRO}/g,\"AUDIT\"); window.audit =  true;}else{var  finaladm=finaladm=adm.replace(/\\${EMX_MACRO}/g,window.cp);}finaladm=finaladm.replace(/\\${RF_MACRO}/g,rf);try{document.write(decodeURI(finaladm));}catch(e){document.write(unescape(finaladm));};</script><script   src=\"https://js.brealtime.com/openvv.js\"></script></div>",
+          "adm": "<div id=\"cadentimp\"><script>var adm='\\<script\\ src\\=\\'https\\:\\/\\/presentation\\-atl1\\.turn\\.com\\/server\\/ads\\.js\\?code\\=180858515\\&aid\\=49508660\\&tuid\\=3697246472959142409\\&duid\\=3592248512493872937\\&dt\\=a\\&uimpd\\=1OB0KmixN8sHuJc8RPFjxbSZrYW2YZcBuHKg\\-pD5EUJnlrGZTGPpxpl3uYcBYQ7GO937FCfn8dB72mF1jiGRToh8X_UEdA5MP\\-U6ORPQsQ8hmQV0VpZDR7yCaVRZu\\-I8GC4aswLJKm1ehJk2JLqoR8fNGOTt5N02R4_bafcFcCDQehYt_oMETehbgQUsGUuJOUrv\\-rRl46jWaNxtTjLFx01U8qDhPdLKvi2iEiNPYp2pLFfly7qg\\-pjrs0yN8zASsoG5g0qWiuyTjJKZ62irD5SLwF4jQYBxaXIFyF\\-pGADUX2GD6JPzOK9mLaWdX\\-N_fB9gUj8TnVS0WHJ5XJWnCMijjO4qguAQo7LiUftTOQZ66OhXUiNcdI55yMwK0uS_fo2FyHMj2JXiOVpZaJHnWE\\-9QOR3F1E4D9qv9EpOMFAwH1kJqoY\\-G3CBJWC_zUjizw2diGrctqk_tJ9b0jujUs_LmoarsIJcKdWBQoF4xfCjfO7DyaM4l0SBbwLA07GYz0tdDtMd7hbstccVk0PPPVNTOv\\-Pan6yUSHX\\-r\\-U7yDLcFLWxwEaapCh_mKwrATp9oJuOXuK0oIioxIIX9n4raGZPHkl27AX1stb2eIpawf5FkEnwY5YrYIiycI38zuqVAE2ZoI\\-Rn0l8Uckhf1zurAgg6_4AjqZp8oi26jsIHbIc5IsI\\-9UoAoJR_nv_gTojvepaSsA97RYysgopxAW_YzeixMr0LJTvo53DFh4WzrcgaMMPXPf79kdetKmcjPBTPC3bhu9BgI4zAdSobLNCH5BYV1aUcv80K3a1WD7cDZtUXckjWnHt\\-JdzFutuwFnNn66YqhPRxbuWKrW\\-grBHm4T2xv0NxEQIEJxnExroXYCEsPmcki2QTLHbo1fSPgqMF5U4fnfq3\\-3MwNKhtpT4\\-iZN1mzvqeTZPD7TdBWee7k1JXOO_PRyRtwQXaDPQy3HPPvGlRnin_bp26aHCP13HKhn63gh4unBlH7R1xgw0KeaYeBt6C_J9EnIgJQrbpHpwZK0LpM1GSqZ20CbfV891w\\&acp\\=\\$\\{EMX_MACRO\\}\\'\\>\\<\\/script\\><script src=\"https://imp.emxdgt.com/imp/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720\"><\\/script>'; window.vc= 'https://imp.emxdgt.com/view/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720';  var ap=\"${AUCTION_PRICE}\";var rf=document.domain; window.cp=\"0.36666\";  if(ap == \"test=1\" || ap == \"AUDIT\" || rf == \"s3.amazonaws.com\"){var  finaladm=adm.replace(/\\${EMX_MACRO}/g,\"AUDIT\"); window.audit =  true;}else{var  finaladm=finaladm=adm.replace(/\\${EMX_MACRO}/g,window.cp);}finaladm=finaladm.replace(/\\${RF_MACRO}/g,rf);try{document.write(decodeURI(finaladm));}catch(e){document.write(unescape(finaladm));};</script><script   src=\"https://js.brealtime.com/openvv.js\"></script></div>",
           "id": "some_test_ad_id_1",
           "impid": "some_test_ad_id_1",
           "crid": "94395500",
diff --git a/adapters/emx_digital/emx_digitaltest/exemplary/banner-and-video-site.json b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/banner-and-video-site.json
similarity index 69%
rename from adapters/emx_digital/emx_digitaltest/exemplary/banner-and-video-site.json
rename to adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/banner-and-video-site.json
index f47fd667..1ea0397f 100644
--- a/adapters/emx_digital/emx_digitaltest/exemplary/banner-and-video-site.json
+++ b/adapters/cadent_aperture_mx/cadent_aperture_mxtest/exemplary/banner-and-video-site.json
@@ -136,7 +136,7 @@
           "seatbid": [{
               "seat": "12356",
               "bid": [{
-                "adm": "<div id=\"emximp\"><script>var adm='\\<script\\ src\\=\\'https\\:\\/\\/presentation\\-atl1\\.turn\\.com\\/server\\/ads\\.js\\?code\\=180858515\\&aid\\=49508660\\&tuid\\=3697246472959142409\\&duid\\=3592248512493872937\\&dt\\=a\\&uimpd\\=1OB0KmixN8sHuJc8RPFjxbSZrYW2YZcBuHKg\\-pD5EUJnlrGZTGPpxpl3uYcBYQ7GO937FCfn8dB72mF1jiGRToh8X_UEdA5MP\\-U6ORPQsQ8hmQV0VpZDR7yCaVRZu\\-I8GC4aswLJKm1ehJk2JLqoR8fNGOTt5N02R4_bafcFcCDQehYt_oMETehbgQUsGUuJOUrv\\-rRl46jWaNxtTjLFx01U8qDhPdLKvi2iEiNPYp2pLFfly7qg\\-pjrs0yN8zASsoG5g0qWiuyTjJKZ62irD5SLwF4jQYBxaXIFyF\\-pGADUX2GD6JPzOK9mLaWdX\\-N_fB9gUj8TnVS0WHJ5XJWnCMijjO4qguAQo7LiUftTOQZ66OhXUiNcdI55yMwK0uS_fo2FyHMj2JXiOVpZaJHnWE\\-9QOR3F1E4D9qv9EpOMFAwH1kJqoY\\-G3CBJWC_zUjizw2diGrctqk_tJ9b0jujUs_LmoarsIJcKdWBQoF4xfCjfO7DyaM4l0SBbwLA07GYz0tdDtMd7hbstccVk0PPPVNTOv\\-Pan6yUSHX\\-r\\-U7yDLcFLWxwEaapCh_mKwrATp9oJuOXuK0oIioxIIX9n4raGZPHkl27AX1stb2eIpawf5FkEnwY5YrYIiycI38zuqVAE2ZoI\\-Rn0l8Uckhf1zurAgg6_4AjqZp8oi26jsIHbIc5IsI\\-9UoAoJR_nv_gTojvepaSsA97RYysgopxAW_YzeixMr0LJTvo53DFh4WzrcgaMMPXPf79kdetKmcjPBTPC3bhu9BgI4zAdSobLNCH5BYV1aUcv80K3a1WD7cDZtUXckjWnHt\\-JdzFutuwFnNn66YqhPRxbuWKrW\\-grBHm4T2xv0NxEQIEJxnExroXYCEsPmcki2QTLHbo1fSPgqMF5U4fnfq3\\-3MwNKhtpT4\\-iZN1mzvqeTZPD7TdBWee7k1JXOO_PRyRtwQXaDPQy3HPPvGlRnin_bp26aHCP13HKhn63gh4unBlH7R1xgw0KeaYeBt6C_J9EnIgJQrbpHpwZK0LpM1GSqZ20CbfV891w\\&acp\\=\\$\\{EMX_MACRO\\}\\'\\>\\<\\/script\\><script src=\"https://imp.emxdgt.com/imp/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720\"><\\/script>'; window.vc= 'https://imp.emxdgt.com/view/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720';  var ap=\"${AUCTION_PRICE}\";var rf=document.domain; window.cp=\"0.36666\";  if(ap == \"test=1\" || ap == \"AUDIT\" || rf == \"s3.amazonaws.com\"){var  finaladm=adm.replace(/\\${EMX_MACRO}/g,\"AUDIT\"); window.audit =  true;}else{var  finaladm=finaladm=adm.replace(/\\${EMX_MACRO}/g,window.cp);}finaladm=finaladm.replace(/\\${RF_MACRO}/g,rf);try{document.write(decodeURI(finaladm));}catch(e){document.write(unescape(finaladm));};</script><script   src=\"https://js.brealtime.com/openvv.js\"></script></div>",
+                "adm": "<div id=\"cadentimp\"><script>var adm='\\<script\\ src\\=\\'https\\:\\/\\/presentation\\-atl1\\.turn\\.com\\/server\\/ads\\.js\\?code\\=180858515\\&aid\\=49508660\\&tuid\\=3697246472959142409\\&duid\\=3592248512493872937\\&dt\\=a\\&uimpd\\=1OB0KmixN8sHuJc8RPFjxbSZrYW2YZcBuHKg\\-pD5EUJnlrGZTGPpxpl3uYcBYQ7GO937FCfn8dB72mF1jiGRToh8X_UEdA5MP\\-U6ORPQsQ8hmQV0VpZDR7yCaVRZu\\-I8GC4aswLJKm1ehJk2JLqoR8fNGOTt5N02R4_bafcFcCDQehYt_oMETehbgQUsGUuJOUrv\\-rRl46jWaNxtTjLFx01U8qDhPdLKvi2iEiNPYp2pLFfly7qg\\-pjrs0yN8zASsoG5g0qWiuyTjJKZ62irD5SLwF4jQYBxaXIFyF\\-pGADUX2GD6JPzOK9mLaWdX\\-N_fB9gUj8TnVS0WHJ5XJWnCMijjO4qguAQo7LiUftTOQZ66OhXUiNcdI55yMwK0uS_fo2FyHMj2JXiOVpZaJHnWE\\-9QOR3F1E4D9qv9EpOMFAwH1kJqoY\\-G3CBJWC_zUjizw2diGrctqk_tJ9b0jujUs_LmoarsIJcKdWBQoF4xfCjfO7DyaM4l0SBbwLA07GYz0tdDtMd7hbstccVk0PPPVNTOv\\-Pan6yUSHX\\-r\\-U7yDLcFLWxwEaapCh_mKwrATp9oJuOXuK0oIioxIIX9n4raGZPHkl27AX1stb2eIpawf5FkEnwY5YrYIiycI38zuqVAE2ZoI\\-Rn0l8Uckhf1zurAgg6_4AjqZp8oi26jsIHbIc5IsI\\-9UoAoJR_nv_gTojvepaSsA97RYysgopxAW_YzeixMr0LJTvo53DFh4WzrcgaMMPXPf79kdetKmcjPBTPC3bhu9BgI4zAdSobLNCH5BYV1aUcv80K3a1WD7cDZtUXckjWnHt\\-JdzFutuwFnNn66YqhPRxbuWKrW\\-grBHm4T2xv0NxEQIEJxnExroXYCEsPmcki2QTLHbo1fSPgqMF5U4fnfq3\\-3MwNKhtpT4\\-iZN1mzvqeTZPD7TdBWee7k1JXOO_PRyRtwQXaDPQy3HPPvGlRnin_bp26aHCP13HKhn63gh4unBlH7R1xgw0KeaYeBt6C_J9EnIgJQrbpHpwZK0LpM1GSqZ20CbfV891w\\&acp\\=\\$\\{EMX_MACRO\\}\\'\\>\\<\\/script\\><script src=\"https://imp.emxdgt.com/imp/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720\"><\\/script>'; window.vc= 'https://imp.emxdgt.com/view/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720';  var ap=\"${AUCTION_PRICE}\";var rf=document.domain; window.cp=\"0.36666\";  if(ap == \"test=1\" || ap == \"AUDIT\" || rf == \"s3.amazonaws.com\"){var  finaladm=adm.replace(/\\${EMX_MACRO}/g,\"AUDIT\"); window.audit =  true;}else{var  finaladm=finaladm=adm.replace(/\\${EMX_MACRO}/g,window.cp);}finaladm=finaladm.replace(/\\${RF_MACRO}/g,rf);try{document.write(decodeURI(finaladm));}catch(e){document.write(unescape(finaladm));};</script><script   src=\"https://js.brealtime.com/openvv.js\"></script></div>",
                 "id": "some_test_ad_id_1",
                 "impid": "some_test_ad_id_1",
                 "ttl": 300,
@@ -170,7 +170,7 @@
     "expectedBidResponses": [{
       "bids": [{
         "bid": {
-          "adm": "<div id=\"emximp\"><script>var adm='\\<script\\ src\\=\\'https\\:\\/\\/presentation\\-atl1\\.turn\\.com\\/server\\/ads\\.js\\?code\\=180858515\\&aid\\=49508660\\&tuid\\=3697246472959142409\\&duid\\=3592248512493872937\\&dt\\=a\\&uimpd\\=1OB0KmixN8sHuJc8RPFjxbSZrYW2YZcBuHKg\\-pD5EUJnlrGZTGPpxpl3uYcBYQ7GO937FCfn8dB72mF1jiGRToh8X_UEdA5MP\\-U6ORPQsQ8hmQV0VpZDR7yCaVRZu\\-I8GC4aswLJKm1ehJk2JLqoR8fNGOTt5N02R4_bafcFcCDQehYt_oMETehbgQUsGUuJOUrv\\-rRl46jWaNxtTjLFx01U8qDhPdLKvi2iEiNPYp2pLFfly7qg\\-pjrs0yN8zASsoG5g0qWiuyTjJKZ62irD5SLwF4jQYBxaXIFyF\\-pGADUX2GD6JPzOK9mLaWdX\\-N_fB9gUj8TnVS0WHJ5XJWnCMijjO4qguAQo7LiUftTOQZ66OhXUiNcdI55yMwK0uS_fo2FyHMj2JXiOVpZaJHnWE\\-9QOR3F1E4D9qv9EpOMFAwH1kJqoY\\-G3CBJWC_zUjizw2diGrctqk_tJ9b0jujUs_LmoarsIJcKdWBQoF4xfCjfO7DyaM4l0SBbwLA07GYz0tdDtMd7hbstccVk0PPPVNTOv\\-Pan6yUSHX\\-r\\-U7yDLcFLWxwEaapCh_mKwrATp9oJuOXuK0oIioxIIX9n4raGZPHkl27AX1stb2eIpawf5FkEnwY5YrYIiycI38zuqVAE2ZoI\\-Rn0l8Uckhf1zurAgg6_4AjqZp8oi26jsIHbIc5IsI\\-9UoAoJR_nv_gTojvepaSsA97RYysgopxAW_YzeixMr0LJTvo53DFh4WzrcgaMMPXPf79kdetKmcjPBTPC3bhu9BgI4zAdSobLNCH5BYV1aUcv80K3a1WD7cDZtUXckjWnHt\\-JdzFutuwFnNn66YqhPRxbuWKrW\\-grBHm4T2xv0NxEQIEJxnExroXYCEsPmcki2QTLHbo1fSPgqMF5U4fnfq3\\-3MwNKhtpT4\\-iZN1mzvqeTZPD7TdBWee7k1JXOO_PRyRtwQXaDPQy3HPPvGlRnin_bp26aHCP13HKhn63gh4unBlH7R1xgw0KeaYeBt6C_J9EnIgJQrbpHpwZK0LpM1GSqZ20CbfV891w\\&acp\\=\\$\\{EMX_MACRO\\}\\'\\>\\<\\/script\\><script src=\"https://imp.emxdgt.com/imp/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720\"><\\/script>'; window.vc= 'https://imp.emxdgt.com/view/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720';  var ap=\"${AUCTION_PRICE}\";var rf=document.domain; window.cp=\"0.36666\";  if(ap == \"test=1\" || ap == \"AUDIT\" || rf == \"s3.amazonaws.com\"){var  finaladm=adm.replace(/\\${EMX_MACRO}/g,\"AUDIT\"); window.audit =  true;}else{var  finaladm=finaladm=adm.replace(/\\${EMX_MACRO}/g,window.cp);}finaladm=finaladm.replace(/\\${RF_MACRO}/g,rf);try{document.write(decodeURI(finaladm));}catch(e){document.write(unescape(finaladm));};</script><script   src=\"https://js.brealtime.com/openvv.js\"></script></div>",
+          "adm": "<div id=\"cadentimp\"><script>var adm='\\<script\\ src\\=\\'https\\:\\/\\/presentation\\-atl1\\.turn\\.com\\/server\\/ads\\.js\\?code\\=180858515\\&aid\\=49508660\\&tuid\\=3697246472959142409\\&duid\\=3592248512493872937\\&dt\\=a\\&uimpd\\=1OB0KmixN8sHuJc8RPFjxbSZrYW2YZcBuHKg\\-pD5EUJnlrGZTGPpxpl3uYcBYQ7GO937FCfn8dB72mF1jiGRToh8X_UEdA5MP\\-U6ORPQsQ8hmQV0VpZDR7yCaVRZu\\-I8GC4aswLJKm1ehJk2JLqoR8fNGOTt5N02R4_bafcFcCDQehYt_oMETehbgQUsGUuJOUrv\\-rRl46jWaNxtTjLFx01U8qDhPdLKvi2iEiNPYp2pLFfly7qg\\-pjrs0yN8zASsoG5g0qWiuyTjJKZ62irD5SLwF4jQYBxaXIFyF\\-pGADUX2GD6JPzOK9mLaWdX\\-N_fB9gUj8TnVS0WHJ5XJWnCMijjO4qguAQo7LiUftTOQZ66OhXUiNcdI55yMwK0uS_fo2FyHMj2JXiOVpZaJHnWE\\-9QOR3F1E4D9qv9EpOMFAwH1kJqoY\\-G3CBJWC_zUjizw2diGrctqk_tJ9b0jujUs_LmoarsIJcKdWBQoF4xfCjfO7DyaM4l0SBbwLA07GYz0tdDtMd7hbstccVk0PPPVNTOv\\-Pan6yUSHX\\-r\\-U7yDLcFLWxwEaapCh_mKwrATp9oJuOXuK0oIioxIIX9n4raGZPHkl27AX1stb2eIpawf5FkEnwY5YrYIiycI38zuqVAE2ZoI\\-Rn0l8Uckhf1zurAgg6_4AjqZp8oi26jsIHbIc5IsI\\-9UoAoJR_nv_gTojvepaSsA97RYysgopxAW_YzeixMr0LJTvo53DFh4WzrcgaMMPXPf79kdetKmcjPBTPC3bhu9BgI4zAdSobLNCH5BYV1aUcv80K3a1WD7cDZtUXckjWnHt\\-JdzFutuwFnNn66YqhPRxbuWKrW\\-grBHm4T2xv0NxEQIEJxnExroXYCEsPmcki2QTLHbo1fSPgqMF5U4fnfq3\\-3MwNKhtpT4\\-iZN1mzvqeTZPD7TdBWee7k1JXOO_PRyRtwQXaDPQy3HPPvGlRnin_bp26aHCP13HKhn63gh4unBlH7R1xgw0KeaYeBt6C_J9EnIgJQrbpHpwZK0LpM1GSqZ20CbfV891w\\&acp\\=\\$\\{EMX_MACRO\\}\\'\\>\\<\\/script\\><script src=\"https://imp.emxdgt.com/imp/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720\"><\\/script>'; window.vc= 'https://imp.emxdgt.com/view/?cp=0.36666&ts=1603222211&adom=www.avis.com&seat=1085&w=320&h=50&pb=0.293328&sid=13835&tid=114507&pid=1764&uid=91441603222210784060e1&wid=15&dom=358899126&tp=${EMX_MACRO}&mt=1&dt=1&st=3&os=&ip=108.17.145.117&sz=&country=US&region=VA&city=Chesapeake&zip=&dma=&agency_id=0&cluster=staging&rf=${RF_MACRO}&cat=1-4&crid=1607428720';  var ap=\"${AUCTION_PRICE}\";var rf=document.domain; window.cp=\"0.36666\";  if(ap == \"test=1\" || ap == \"AUDIT\" || rf == \"s3.amazonaws.com\"){var  finaladm=adm.replace(/\\${EMX_MACRO}/g,\"AUDIT\"); window.audit =  true;}else{var  finaladm=finaladm=adm.replace(/\\${EMX_MACRO}/g,window.cp);}finaladm=finaladm.replace(/\\${RF_MACRO}/g,rf);try{document.write(decodeURI(finaladm));}catch(e){document.write(unescape(finaladm));};</script><script   src=\"https://js.brealtime.com/openvv.js\"></script></div>",
           "id": "some_test_ad_id_1",
           "impid": "some_test_ad_id_1",
           "crid": "94395500",
diff --git a/adapters/emx_digital/emx_digital_test.go b/adapters/cadent_aperture_mx/cadentaperturemx_test.go
similarity index 66%
rename from adapters/emx_digital/emx_digital_test.go
rename to adapters/cadent_aperture_mx/cadentaperturemx_test.go
index 6538ff70..60034322 100644
--- a/adapters/emx_digital/emx_digital_test.go
+++ b/adapters/cadent_aperture_mx/cadentaperturemx_test.go
@@ -1,4 +1,4 @@
-package emx_digital
+package cadentaperturemx
 
 import (
 	"testing"
@@ -10,7 +10,7 @@ import (
 )
 
 func TestJsonSamples(t *testing.T) {
-	bidder, buildErr := Builder(openrtb_ext.BidderEmxDigital, config.Adapter{
+	bidder, buildErr := Builder(openrtb_ext.BidderCadentApertureMX, config.Adapter{
 		Endpoint: "https://hb.emxdgt.com"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"})
 
 	if buildErr != nil {
@@ -18,10 +18,10 @@ func TestJsonSamples(t *testing.T) {
 	}
 
 	setTesting(bidder)
-	adapterstest.RunJSONBidderTest(t, "emx_digitaltest", bidder)
+	adapterstest.RunJSONBidderTest(t, "cadent_aperture_mxtest", bidder)
 }
 
 func setTesting(bidder adapters.Bidder) {
-	bidderEmxDigital, _ := bidder.(*EmxDigitalAdapter)
-	bidderEmxDigital.testing = true
+	bidderCadentApertureMX, _ := bidder.(*adapter)
+	bidderCadentApertureMX.testing = true
 }
diff --git a/adapters/emx_digital/params_test.go b/adapters/cadent_aperture_mx/params_test.go
similarity index 75%
rename from adapters/emx_digital/params_test.go
rename to adapters/cadent_aperture_mx/params_test.go
index 49ad9eb1..b5b73553 100644
--- a/adapters/emx_digital/params_test.go
+++ b/adapters/cadent_aperture_mx/params_test.go
@@ -1,4 +1,4 @@
-package emx_digital
+package cadentaperturemx
 
 import (
 	"encoding/json"
@@ -14,8 +14,8 @@ func TestValidParams(t *testing.T) {
 	}
 
 	for _, validParam := range validParams {
-		if err := validator.Validate(openrtb_ext.BidderEmxDigital, json.RawMessage(validParam)); err != nil {
-			t.Errorf("Schema rejected emx_digital params: %s", validParam)
+		if err := validator.Validate(openrtb_ext.BidderCadentApertureMX, json.RawMessage(validParam)); err != nil {
+			t.Errorf("Schema rejected cadent_aperture_mx params: %s", validParam)
 		}
 	}
 }
@@ -27,7 +27,7 @@ func TestInvalidParams(t *testing.T) {
 	}
 
 	for _, invalidParam := range invalidParams {
-		if err := validator.Validate(openrtb_ext.BidderEmxDigital, json.RawMessage(invalidParam)); err == nil {
+		if err := validator.Validate(openrtb_ext.BidderCadentApertureMX, json.RawMessage(invalidParam)); err == nil {
 			t.Errorf("Schema allowed unexpected params: %s", invalidParam)
 		}
 	}
diff --git a/adapters/flipp/flipptest/exemplary/simple-banner-native.json b/adapters/flipp/flipptest/exemplary/simple-banner-native.json
index c242c323..d8a24131 100644
--- a/adapters/flipp/flipptest/exemplary/simple-banner-native.json
+++ b/adapters/flipp/flipptest/exemplary/simple-banner-native.json
@@ -30,7 +30,6 @@
                                 "creativeType": "NativeX",
                                 "siteId": 1243066,
                                 "zoneIds": [285431],
-                                "ip": "123.123.123.124",
                                 "options": {
                                    "startCompact": true,
                                    "contentCode": "publisher-test-2"
@@ -46,7 +45,7 @@
             "expectedRequest": {
                 "uri": "http://example.com/pserver",
                 "body": {
-                    "ip":"123.123.123.124",
+                    "ip":"123.123.123.123",
                     "keywords":[
                        ""
                     ],
diff --git a/config/bidderinfo_test.go b/config/bidderinfo_test.go
index 60221da2..e505d2f8 100644
--- a/config/bidderinfo_test.go
+++ b/config/bidderinfo_test.go
@@ -905,6 +905,332 @@ func TestBidderInfoValidationNegative(t *testing.T) {
 				errors.New("The endpoint: incorrect for bidderB is not a valid URL"),
 			},
 		},
+		{
+			"Invalid alias Site capabilities",
+			BidderInfos{
+				"bidderA": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						Site: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeVideo,
+							},
+						},
+					},
+				},
+				"bidderB": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						App: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeVideo,
+							},
+						},
+					},
+					AliasOf: "bidderA",
+				},
+			},
+			[]error{
+				errors.New("capabilities for alias: bidderB should be a subset of capabilities for parent bidder: bidderA"),
+			},
+		},
+		{
+			"Invalid alias App capabilities",
+			BidderInfos{
+				"bidderA": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						App: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeVideo,
+							},
+						},
+					},
+				},
+				"bidderB": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						Site: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeVideo,
+							},
+						},
+					},
+					AliasOf: "bidderA",
+				},
+			},
+			[]error{
+				errors.New("capabilities for alias: bidderB should be a subset of capabilities for parent bidder: bidderA"),
+			},
+		},
+		{
+			"Invalid alias capabilities",
+			BidderInfos{
+				"bidderA": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{},
+				},
+				"bidderB": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						App: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeVideo,
+							},
+						},
+					},
+					AliasOf: "bidderA",
+				},
+			},
+			[]error{
+				errors.New("at least one of capabilities.site or capabilities.app must exist for adapter: bidderA"),
+				errors.New("capabilities for alias: bidderB should be a subset of capabilities for parent bidder: bidderA"),
+			},
+		},
+		{
+			"Invalid alias MediaTypes for site",
+			BidderInfos{
+				"bidderA": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						Site: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeVideo,
+							},
+						},
+					},
+				},
+				"bidderB": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						Site: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeBanner,
+								openrtb_ext.BidTypeNative,
+							},
+						},
+					},
+					AliasOf: "bidderA",
+				},
+			},
+			[]error{
+				errors.New("mediaTypes for alias: bidderB should be a subset of MediaTypes for parent bidder: bidderA"),
+			},
+		},
+		{
+			"Invalid alias MediaTypes for app",
+			BidderInfos{
+				"bidderA": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						App: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeVideo,
+							},
+						},
+					},
+				},
+				"bidderB": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						App: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeBanner,
+								openrtb_ext.BidTypeNative,
+							},
+						},
+					},
+					AliasOf: "bidderA",
+				},
+			},
+			[]error{
+				errors.New("mediaTypes for alias: bidderB should be a subset of MediaTypes for parent bidder: bidderA"),
+			},
+		},
+		{
+			"Invalid parent bidder capabilities",
+			BidderInfos{
+				"bidderA": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+				},
+				"bidderB": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						App: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeBanner,
+							},
+						},
+					},
+					AliasOf: "bidderA",
+				},
+			},
+			[]error{
+				errors.New("missing required field: capabilities for adapter: bidderA"),
+				errors.New("capabilities for alias: bidderB should be a subset of capabilities for parent bidder: bidderA"),
+			},
+		},
+		{
+			"Invalid site alias capabilities with both site and app",
+			BidderInfos{
+				"bidderA": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						App: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeBanner,
+								openrtb_ext.BidTypeNative,
+							},
+						},
+						Site: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeNative,
+							},
+						},
+					},
+				},
+				"bidderB": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						App: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeBanner,
+								openrtb_ext.BidTypeNative,
+							},
+						},
+						Site: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeBanner,
+								openrtb_ext.BidTypeNative,
+							},
+						},
+					},
+					AliasOf: "bidderA",
+				},
+			},
+			[]error{
+				errors.New("mediaTypes for alias: bidderB should be a subset of MediaTypes for parent bidder: bidderA"),
+			},
+		},
+		{
+			"Invalid app alias capabilities with both site and app",
+			BidderInfos{
+				"bidderA": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						App: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeBanner,
+								openrtb_ext.BidTypeNative,
+							},
+						},
+						Site: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeNative,
+							},
+						},
+					},
+				},
+				"bidderB": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						App: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeBanner,
+								openrtb_ext.BidTypeNative,
+							},
+						},
+						Site: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeBanner,
+								openrtb_ext.BidTypeNative,
+							},
+						},
+					},
+					AliasOf: "bidderA",
+				},
+			},
+			[]error{
+				errors.New("mediaTypes for alias: bidderB should be a subset of MediaTypes for parent bidder: bidderA"),
+			},
+		},
+		{
+			"Invalid parent bidder for alias",
+			BidderInfos{
+				"bidderB": BidderInfo{
+					Endpoint: "http://bidderA.com/openrtb2",
+					Maintainer: &MaintainerInfo{
+						Email: "maintainer@bidderA.com",
+					},
+					Capabilities: &CapabilitiesInfo{
+						App: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeBanner,
+								openrtb_ext.BidTypeNative,
+							},
+						},
+						Site: &PlatformInfo{
+							MediaTypes: []openrtb_ext.BidType{
+								openrtb_ext.BidTypeBanner,
+								openrtb_ext.BidTypeNative,
+							},
+						},
+					},
+					AliasOf: "bidderC",
+				},
+			},
+			[]error{
+				errors.New("parent bidder: bidderC not found for an alias: bidderB"),
+			},
+		},
 	}
 
 	for _, test := range testCases {
diff --git a/exchange/adapter_util_test.go b/exchange/adapter_util_test.go
index f860a1df..611498fe 100644
--- a/exchange/adapter_util_test.go
+++ b/exchange/adapter_util_test.go
@@ -171,6 +171,55 @@ func TestBuildBidders(t *testing.T) {
 	}
 }
 
+func TestSetAliasBuilder(t *testing.T) {
+	rubiconBidder := fakeBidder{"b"}
+	ixBidder := fakeBidder{"ix"}
+	rubiconBuilder := fakeBuilder{rubiconBidder, nil}.Builder
+	ixBuilder := fakeBuilder{ixBidder, nil}.Builder
+
+	testCases := []struct {
+		description      string
+		bidderInfo       config.BidderInfo
+		builders         map[openrtb_ext.BidderName]adapters.Builder
+		bidderName       openrtb_ext.BidderName
+		expectedBuilders map[openrtb_ext.BidderName]adapters.Builder
+		expectedError    error
+	}{
+		{
+			description:      "Success - Alias builder",
+			bidderInfo:       config.BidderInfo{Disabled: false, AliasOf: "rubicon"},
+			bidderName:       openrtb_ext.BidderName("appnexus"),
+			builders:         map[openrtb_ext.BidderName]adapters.Builder{openrtb_ext.BidderRubicon: rubiconBuilder},
+			expectedBuilders: map[openrtb_ext.BidderName]adapters.Builder{openrtb_ext.BidderRubicon: rubiconBuilder, openrtb_ext.BidderAppnexus: rubiconBuilder},
+		},
+		{
+			description:   "Failure - Invalid parent bidder builder",
+			bidderInfo:    config.BidderInfo{Disabled: false, AliasOf: "rubicon"},
+			bidderName:    openrtb_ext.BidderName("appnexus"),
+			builders:      map[openrtb_ext.BidderName]adapters.Builder{openrtb_ext.BidderIx: ixBuilder},
+			expectedError: errors.New("rubicon: parent builder not registered"),
+		},
+		{
+			description:   "Failure - Invalid parent for alias",
+			bidderInfo:    config.BidderInfo{Disabled: false, AliasOf: "unknown"},
+			bidderName:    openrtb_ext.BidderName("appnexus"),
+			builders:      map[openrtb_ext.BidderName]adapters.Builder{openrtb_ext.BidderIx: ixBuilder},
+			expectedError: errors.New("unknown parent bidder: unknown for alias: appnexus"),
+		},
+	}
+
+	for _, test := range testCases {
+		err := setAliasBuilder(test.bidderInfo, test.builders, test.bidderName)
+
+		if test.expectedBuilders != nil {
+			assert.ObjectsAreEqual(test.builders, test.expectedBuilders)
+		}
+		if test.expectedError != nil {
+			assert.EqualError(t, test.expectedError, err.Error(), test.description+":errors")
+		}
+	}
+}
+
 func TestGetActiveBidders(t *testing.T) {
 	testCases := []struct {
 		description string