> ## 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:

```swift theme={null}
let ad = try await ads.format(.pause)
if ad.price.value >= otherNetworkCPM {
    try await ad.load()
    pauseAd = ad
} else {
    try ad.reject(.outbid(winningPrice: otherNetworkCPM, winner: "Other network"))
}
```

`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.