> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kontext.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Running your own auction

> Compare an ad's price with your other networks before it renders, then load it or reject it.

`VideoAd` carries the price before anything is rendered, so you can compare it with other networks and decide:

```kotlin theme={null}
val ad = ads.format(AdFormat.PAUSE)
if (ad.price.value >= otherNetworkCpm) {
    ad.load()
    pauseAd = ad
} else {
    try {
        ad.reject(VideoAd.RejectReason.Outbid(winningPrice = otherNetworkCpm, winner = "Other network"))
    } catch (e: VideoAdException) {
        // the ad already ended (it expired): nothing to tell
    }
}
```

`price.value` is a CPM in `price.currency`. `price.precision` says whether it is a DSP's clearing price (`EXACT`) or a forecast for house demand (`ESTIMATED`).

`reject` tells the server at once, and the server tells the advertiser its win produced no impression. Use `Outbid` when another network won on price, with the winning price and the network, so we can optimize our bids for your traffic; `NotUsed` (the default) for any other reason: the moment passed, the viewer left. Rejecting is optional; an ad you never use is settled when it expires or when you call `destroy()`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.