Bestchange API Parser (new, starting from v2.6)
The module is available starting from version 2.6!
Due to technical reasons, it is not possible to transfer settings from the Bestchange parser module. Therefore, you will need to set up all exchange rates from scratch for the new module.
To automatically update exchange rates, it is essential to create a Cron job on your server using the link from the "BestChange API Parser" -> "Settings" section.
The hash for the Cron job link is specified in the wp-content/plugins/premiumbox/userdata.php
file.
Please note that using the Bestchange API parser does not guarantee you a spot in the list of exchangers on Bestchange, as specified in the parser settings.
The module is available for all exchangers using the Premium Exchanger script—your competitors can set up the parser just like you, so all exchangers using the parser will compete for the specified position (usually the top spot) in the chosen exchange direction.
The only way to guarantee a top position is through constant undercutting.
You can also further configure the minimum and maximum rates according to this guide to avoid going into the negative if another exchanger decides to undercut as well (this will pull you along if you have selected the first position binding and have not set the min/max rates).
The Bestchange API parser will only work in an active exchange direction—make sure to set the direction to active before starting the configuration of the parser.
General Module Settings

Domain — Enter one of the domains from the list below the field. If the field is empty (when the parser uses the main BC domain), the parser will not work (currencies and cities will not be displayed in the list below on this page).
API Key — The API key from your personal account on the Bestchange website.

Timeout (sec.) — The time to wait for a response from Bestchange (recommended value is 20 seconds. If set to 0, it will also default to 20 seconds).
Site version — The language version of the Bestchange website (en or ru).
Position: &#xNAN;• Rate — The base exchange rate (calculation formula: rate = from_amount / to_amount) &#xNAN;• Rankrate — The rate with additional fees applied, calculated for an exchange amount of $300. This rate is displayed by default on Bestchange. If you want to get a ranking of exchangers sorted by exchange rate as on Bestchange, it is better to use rankrate.
Blacklist of exchanger IDs (comma-separated) — IDs of exchangers whose rates will be ignored during parsing.
Whitelist of exchanger IDs (comma-separated) — IDs of exchangers whose rates will be used during parsing (if at least one ID is specified, the parser will only use the rate from this source, ignoring other exchangers).
Delete old data: &#xNAN;• Yes — Data obtained from the parser will be deleted before each new rate update (if the rate is not updated for any reason, it will display as 0 = 0 until the next successful rate update) &#xNAN;• No — Data obtained from the parser will not be deleted before each new rate update (if the rate is not updated for any reason, it will display the previous value until the next successful rate update).
Disable protection: &#xNAN;• Yes — Protection against rate fluctuations is disabled. &#xNAN;• No — Protection against rate fluctuations is enabled. The protection uses data from the top 5 positions in the Bestchange listing to calculate the difference between rates—the rate cannot exceed this difference.
Select currencies — A list of available currencies from Bestchange for parsing (the list will only be displayed after entering a valid API key in the parser settings).

Select cities — A list of cities from Bestchange for parsing (the list will only be displayed after entering a valid API key in the parser settings).

Parser Settings for Exchange Direction
In the control panel, go to "Exchange Directions" → "Exchange Directions" to edit the exchange direction.
On the "Auto Rate Adjustment" and "Bestchange Parser" tabs, before starting the configuration of the BestChange API parser, disable any active rate auto-adjustments if such settings are in use.


On the "BestChange API Parser" tab, you will see a settings block. Make the necessary configurations:

Enable parser: &#xNAN;• Yes — The parser is enabled for the exchange direction. &#xNAN;• No — The parser is not in use.
To activate the parser, you must select 2 currencies in the "Currencies (You Give)" and "Currencies (You Receive)" fields.
Blacklist of exchanger IDs (comma-separated) — IDs of exchangers whose rates will be ignored during parsing.
Whitelist of exchanger IDs (comma-separated) — IDs of exchangers whose rates will be used during parsing (if at least one ID is specified, the parser will only use the rate from this source, ignoring other exchangers).
If similar fields are filled in the general parser settings, they will be ignored for the settings of this exchange direction—the settings for the exchange direction take precedence.
If the fields in the exchange direction settings are not filled, but the general settings are, the general settings will apply to the exchange direction.
City — A list of cities that are checked in the general parser settings (the city is selected for the exchange direction with cash).
Currencies (You Give) — Select the currency for the "You Give" side.
Currencies (You Receive) — Select the currency for the "You Receive" side.
Rate Side: &#xNAN;• Auto — Automatic selection of the rate side for values in the "Min. Rate" and "Max. Rate" fields. &#xNAN;• 1 = XXX — Forced setting of the rate 1 to XXX. &#xNAN;• XXX = 1 — Forced setting of the rate XXX to 1.
Position — The position from the Bestchange ranking for the selected exchange direction (if the field is not filled, the 1st position is used).
Step — Adjustment of the rate obtained from the parser (for example, 0.001). The system by default always makes your rate more favorable than the rate specified in the "Position" field. The step can also be set as a percentage (for example, 3%).
Here’s a naturalistic English translation of the provided text:
The value of a step with a negative sign ("-") will decrease your rate compared to the specified position (by -0.001 or -3%). You can also use multiplication and division (e.g., *2 or /2, *3% or /3%).
Minimum Reserve for Position — the minimum reserve value for the position (for the currency "You Receive"). Exchange services with reserves below this specified value will be ignored by the module.
Show Rating — a page displaying currency rates from Bestchange along with the recommended step.

Minimum Rate — the lowest threshold for the rate, below which the binding to the position will not function. If a competitor for the specified position goes below this minimum rate, the module will reset your rate to the standard one (if this option is enabled).
If one or all options ("Minimum Rate", "Maximum Rate", "Standard Rate") are specified both manually and through the "Auto Rate Adjustment" option,
the rate from the "Auto Rate Adjustment" field will always take precedence and will be used by the parser.
Auto Adjustment of Minimum Rate — binding the minimum rate to a selected source from the "Parsers 2.0" -> "Rates" section. &#xNAN;• Add to Rate — adjustment of the minimum rate obtained from the source (for example, adding 3% or subtracting -3%).
Maximum Rate — the highest threshold for the rate, above which the binding to the position will not function. If a competitor for the specified position exceeds this maximum rate, the module will reset your rate to the standard one (if this option is enabled).
Auto Adjustment of Maximum Rate — binding the maximum rate to a selected source from the "Parsers 2.0" -> "Rates" section. &#xNAN;• Add to Rate — adjustment of the maximum rate obtained from the source (for example, adding 3% or subtracting -3%).
Reset to Standard Rate: &#xNAN;• Yes — enables the option to reset to the standard rate when exceeding the min/max range. &#xNAN;• No — the option is not used.
Standard Rate (You Give) — manual specification of the standard rate for the "You Give" side.
Standard Rate (You Receive) — manual specification of the standard rate for the "You Receive" side.
Auto Adjustment of Rate — binding the standard rate to a selected source from the "Parsers 2.0" -> "Rates" section. &#xNAN;• Add to Rate (You Give) — adjustment of the maximum rate obtained from the source (for example, adding 3% or subtracting -3%) for the "You Give" side. &#xNAN;• Add to Rate (You Receive) — adjustment of the maximum rate obtained from the source (for example, adding 3% or subtracting -3%) for the "You Receive" side.
Convert Rate: &#xNAN;• Yes — forces the exchange rate to be converted to a format of 1 to XXX. &#xNAN;• No — the option is not used.
Let me know if you need any further assistance!
Last updated