Currency Rate Parser (Parsers 2.0)

In the website control panel under the "Parsers 2.0" section, you will find a list of currency rate sources that can be linked to the exchange rate on the site, as well as the last update time for the rates from these sources.

Parser Settings

  • Sorting: • Manually — manually sort rates according to the "Parsers 2.0" âž” "Sort Rates" section • By Name — rates will be automatically sorted by name

  • Parser Type: • Multithreaded — allows multiple execution threads, each processing a separate source • CURL — can retrieve data from only one request at a time and may be more convenient and simpler for obtaining a small amount of data

  • Parsing Logging: • No — parsing rates from sources will not be logged • Yes — all requests and responses from currency sources will be logged • Errors Only — only errors in retrieving rates will be logged

  • Timeout (sec.) — this is the time the site waits for a response from an external service. If a response is not received within the specified time, the site will continue its operation without an answer. If the time is not set or is equal to 0, the default timeout of 20 seconds applies. There is no universal timeout value, as it depends on the speed of the specific service.

  • Last Update Date — date and time of the last parser update

  • Delete Old Data — delete old rates before running the parser: • No • Yes

  • Rate Sources — all available sources for parsing rates

If needed, you can parse your own currency rates file or an XML file from another exchange to use these rates in other formulas. To do this, go to the "Parsers 2.0" âž” "Add Site" section and in the new window, specify the link to your XML file with rates in the "XML File Address" field. After that, check the box next to the added source.

To activate the parser, go to the "Parsers 2.0" → "Settings" section and check the boxes next to the names of the sources you want to use. After that, run the Cron job from the same page.

Upon successful update of the currency rates, you will see the word "Completed" on the opened page.

If this does not happen or a different message is displayed, check the Parser Logs (the "Parsing Logging" option in the general settings must be enabled beforehand) and read the logs received.

To quickly receive notifications about parsing errors for currency rates, you can set up notifications via email and in Telegram.

Source Rates

This section will display all currency rates obtained from sources. You can use the displayed shortcodes from the "Code" column to create complex rates in the "Rates" section.

For easier searching of specific data, you can use filters based on 3 conditions:

  • Source — display currency rates only from the selected source

  • Currency I Give — display only pairs where the currency in "I Give" is the one specified in the field

  • Currency I Receive — display only pairs where the currency in "I Receive" is the one specified in the field

Rates

In this section, you can also create new currency pairs. Use the default pairs as examples.

You can combine rates from the "Source Rates" section, use decimal fractions in formulas, and perform mathematical operations: • multiplication — [cbr_usdrub] * [bitfinex_bchusd_last_price] • division — 1 / [exmo_bchbtc_last_trade] • subtraction — [ecb_eurrub] - [cbr_eurrub] • addition — [index_support] + 2

Clicking the "Copy" button will create a copy of the currency in the row where the button was clicked.

If any rate in the "Rate for Giving" or "Rate for Receiving" column shows 0, it means that the shortcode used in the "Rate Formula for Giving" or "Rate Formula for Receiving" fields is invalid — replace it.

Converter Module

Custom Coefficients

In this section, you can add coefficients that can also be applied in formulas in the "Rates" section. This option will be useful for those who use floating coefficients in multiple directions — instead of specifying a specific value, you can use the created shortcode in formulas and change its value without needing to edit the "Rates" section.

Starting from version 2.7, the custom coefficients setting has been moved to a separate section.

Section in the sidebar
Coefficient Settings

Index Name — the desired name that will be used in formulas as a shortcode Value Formula — the field where a number or mathematical formula is specified Index Value — the value for the formula specified above (if a formula is provided) Index Type: • Formula substitution in the rate

The formula will be inserted directly into the exchange rate without parentheses, and then the exchange rate value will be calculated.

• Index Value

First, the coefficient value will be calculated, and then it will be used in the exchange rate.

Comment — a space for your notes

Websites (Parsing XML Files)

You can parse open XML files from other exchanges if you know their URL (often it is https://domain/request-exportxml.xml). To use this option, activate the module "Parsing XML Files with Exchange Rates" in the "Modules" section.

After that, add a new source in the "Parsers 2.0" âž” "Add Site" section. In the window that opens, specify a name for the source of your choice and the link to the file with the exchange rates.

Once you save the source, go to the "Parsers 2.0" âž” "Settings" section and activate the newly added source.

After that, the data from the source will appear in the "Parsers 2.0" âž” "Source Rates" section.

Automatic Rate Updates

To automatically update the rates, you need to set up a cron job on the server. In the "Parsers 2.0" âž” "Settings" section, at the top of the page, there is a link labeled "Cron URL for Updating Central Bank and Cryptocurrency Rates," which you need to add to the cron job scheduler on the server.

Last updated