---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.3
alternate:
  - https://yandex.ru/dev/rtb/doc/en/api/macros.md
  - https://yandex.ru/dev/rtb/doc/ru/api/macros.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/rtb/doc/en/llms.txt

# Macros

The banner is embedded on the page using an HTML block called a binding. The binding can contain macros, which are special symbols that the RTB host replaces with values.

In the binding, a macro starts with the dollar symbol, followed by the macro name in curly brackets. An example of the `AUCTION_ID` macro is shown below.

`http://www.admaster.com/landing${AUCTION_ID}`

## RTB host macros

The RTB host replaces the following macros with its own values.

#|
|| **Macro**  | **Value**  ||
|| AUCTION_ID       | Auction ID ( [id](*id) from the RTB host request) ||
|| AUCTION_IMP_ID   | Ad block ID ( [id](*imp_id) of the Impression object from the RTB host request). ||
|| AUCTION_BID_ID | ID of the auction proposal ( [bidid](*bidid) from the DSP response). ||
|| AUCTION_PRICE | Cost of a package of impressions. The package currency is specified in the DSP response (the [cur](*cur) parameter). ||
|| AUCTION_PAGE_URL | The URL of the page for displaying ads. ||
|| AUCTION_LOSS | Reason for auction loss. The status corresponds to the status from the [Notification for reason for loss section](https://yandex.ru/dev/rtb/doc/en/api/bid-loss-notification.md). ||
|| AUCTION_CURRENCY | The currency in which the bid is specified. ||
||
AUCTION_MINIMUM_BID_TO_WIN
AUCTION_MIN_TO_WIN
MIN_BID_TO_WIN
| The winning bid in the auction to which your DSP's bid lost. Supported only for `lurl`. ||
|#

{% note alert %}

The names of these macros are case-sensitive. The RTB host only recognizes **uppercase letters**.

{% endnote %}

[*id]: ID of the auction, assigned by the RTB host. The DSP returns this ID in the response.

[*imp_id]: ID of the advertising block on the HTML page.

[*bidid]: ID of the auction proposal using the DSP's internal numeration.

[*cur]: Currency that the bid is shown in `price` parameter. Acceptable values:
* RUB — Russian ruble.
* USD — United States dollar.
* EUR — Euro.
* CHF — Swiss franc.
* TRY — Turkish lira.
* KZT — Kazakhstani tenge.
