Bestchange API Parser (new, starting from v2.6)

The module is available starting from version 2.6!

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.

How to find the exchanger ID?

Click on the image below to see how to find the exchanger ID on the Bestchange website.

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.

Description of the protection mechanism

To prevent abnormal fluctuations, we use data obtained from five exchangers (highlighted in the table that opens by clicking the "Show ranking" button in the Bestchange parser settings for the exchange direction). We analyze the difference between these rates and set a limit: the rate cannot exceed the maximum difference determined based on this data.

Key terms:

In the screenshot, you can see the email sent to the administrator if protection is enabled and the email template "Bestchange Security Error" is activated.

First rate — the rate of the first position among the five sources.

Your rate — your current rate.

Min security rate — the minimum rate considered safe according to our calculations.

Reasons for implementing protection

In the past, we encountered situations where there were sharp fluctuations in rates on Bestchange due to changes in the format of rate representation (for example, from 1 to XXX to XXX to 1). This protection was developed to track such anomalies.

Conditions for the protection to work

This protection will work effectively if you add small values to the step, for example, 0.0001. If you add more significant values, such as 0.5% or higher, the rate will already be considered abnormal.

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.

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

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

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