← Back to docs

OpenRTB Endpoint

How mde.js and other demand partners submit bids, receive bid responses, and report win/impression events.

Edit this page →

Endpoint URL

POST https://exchange.adsgupta.com/api/openrtb/auction

text
POST https://exchange.adsgupta.com/api/openrtb/auction

Request format (BidRequest)

The exchange expects an OpenRTB 2.6 bid request JSON. Each impression contains an ad unit identifier (tagid/id) and banner sizes.

json
{
  "id": "AUCTION_LOG_ID_OR_EXTERNAL_ID",
  "tmax": 500,
  "imp": [
    {
      "id": "1",
      "tagid": "AD_UNIT_ID",
      "banner": { "w": 300, "h": 250, "battr": [], "pos": 0 },
      "bidfloor": 0.5
    }
  ],
  "site": { "page": "https://publisher.example/product" },
  "device": { "ua": "Mozilla/5.0", "ip": "203.0.113.7" }
}

Response format (BidResponse)

json
{
  "id": "AUCTION_LOG_ID_OR_EXTERNAL_ID",
  "cur": "USD",
  "seatbid": [
    {
      "bid": [
        {
          "id": "AUCTION_LOG_UUID",
          "impid": "1",
          "price": 2.34,
          "adid": "CREATIVE_ID",
          "cid": "CAMPAIGN_ID",
          "crid": "WINNING_CREATIVE_ID",
          "adomain": ["advertiser.example"],
          "adm": "<a ...><img ... /></a>",
          "nurl": "https://exchange.adsgupta.com/api/openrtb/win?auctionId=...&price=${AUCTION_PRICE}",
          "w": 300,
          "h": 250
        }
      ]
    }
  ],
  "bidid": "AUCTION_LOG_UUID"
}

No-bid response

json
{
  "id": "AUCTION_LOG_ID_OR_EXTERNAL_ID",
  "nbr": 2
}

Win notice

After a bid is selected, the exchange can mark the auction as cleared when it receives a win notice.

text
GET https://exchange.adsgupta.com/api/openrtb/win?auctionId={auction_log_id}&price={clearing_price}

Tracking pixels

text
Impression pixel:
GET https://exchange.adsgupta.com/api/track/impression?id={auction_log_id}

Click pixel:
GET https://exchange.adsgupta.com/api/track/click?id={auction_log_id}

sellers.json

text
GET https://exchange.adsgupta.com/sellers.json
// Exposes seller(s) metadata for programmatic compliance.

CORS headers

The exchange supports CORS for auction POST requests.

text
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, X-MDE-Version