Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency: highlighting the default rates param #2845

Merged
merged 1 commit into from
Apr 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions dev-docs/modules/currency.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ pbjs.setConfig({
}
});
{% endhighlight %}
Note that the `defaultRates` attribute is optional, but recommended in case
there's an issue loading the currency file.

{: .alert.alert-warning :}
Note that the `defaultRates` attribute is optional, but recommended in case there's an issue loading the currency file.

In this example, the publisher is providing their own `conversionRateFile`:
{% highlight js %}
Expand Down Expand Up @@ -248,7 +249,7 @@ a currency object that may contain several parameters:
| granularityMultiplier | `decimal` | How much to scale the price granularity calculations. Defaults to 1. | 108 |
| conversionRateFile | `URL` | Optional path to a file containing currency conversion data. See below for the format. Prebid.org hosts a file as described in the next section. | `https://example.com/rates.json` |
| rates | object | This optional argument allows you to specify the rates with a JSON object, subverting the need for the conversionRateFile parameter. If this argument is specified, the conversion rate file will not be loaded. | { 'USD': { 'CNY': 6.8842, 'GBP': 0.7798, 'JPY': 110.49 } } |
| defaultRates | `object` | An optional parameter that defines a default rate that can be used if the currency file cannot be loaded. This option isn't used when the `rates` parameter is supplied. | { 'USD': { 'GPB': 0.75 }} |
| defaultRates | `object` | An optional **but highly recommended** parameter that defines a default rate that can be used if the currency file cannot be loaded. This option isn't used when the `rates` parameter is supplied. | { 'USD': { 'GPB': 0.75 }} |
| bidderCurrencyDefault | `object` | This is an optional argument to provide publishers a way to define which currency is used by a particular bidder. This option was provided as a transition until such a time that most bidder adapters define currency on bid response and is kept for legacy 0.x integrations. | { "bidderXYZ": "GBP" } |

## Currency Rate Conversion File
Expand Down