Export file format
This page contains the description of the standard, supported by the BestChange.com monitor, for generating an export file for transmitting exchange directions. To add an exchanger, together with other information for listing, it is necessary to provide the BestChange administration with a link to the export file posted on your website. An example of such file content is available below.
Basic rules
- The export file is generated in the XML format;
- Every entry starts on a new line. A new line is started by the
\n
character; - A full stop is used as a decimal point for numerical values;
- The root element is
<rates>
; - Every exchange direction is described in the
<item>
element; -
Required elements to describe the exchange direction inside the item element:
<from>
— source currency code. Electronic currency codes are listed below;<to>
— destination currency code. Electronic currency codes are listed below;<in>
— to indicate the exchange rate, how much from currency the customer has to give;<out>
— to indicate the exchange rate, how much to currency the customer will get;<amount>
— the to currency reserve in the exchanger, the maximum that a client can receive;<minamount>
— the minimal amount of currency for exchanging that the exchanger can take from a client. Specified in the from currency.
Example:<minamount>4.1</minamount>
If you have several limits on minimal amount, for example, a separate amount for receiving and for paying, you must specify the maximal value of such limitation in the field of minamount converted in the from currency. If it is not possible to select the maximal value from several minimal amounts, you must specify additional fields minamount with a separate minimal amount in each one;<maxamount>
— the maximal amount of currency the exchanger can take from a client for a one-time transaction. Specified in the from currency.
Example:<maxamount>5000</maxamount>
If you have several limits on maximal amount, for example a separate amount for receiving and for paying, you must specify the minimal value of such limitation in the field of maxiamount converted in the from currency. If it is not possible to select the minimal value from several maximal amounts, you must specify additional fields maxamount with a separate maximal amount in each one.
-
Additional elements to describe the exchange direction inside the item element:
<fromfee>
— the additional commission fee that is not included in the exchange rate and is taken from the amount the user transfers to the exchanger. Specifies the value in the from currency.
Example:<fromfee>2.15</fromfee>
It is also possible to use the%
character in order to specify the commission fee in percentage terms;<tofee>
— the additional commission fee that is not included in the exchange rate and is taken from the amount the exchanger transfers to the user. Specified in the to currency.
Example:<tofee>0.01508</tofee>
It is also possible to use the%
character in order to specify the commission fee in percentage terms;<floating>
— for setting the floating rate mark. The time is set in minutes for which the rate will be fixed. The value0
is specified in case there is no fixation. It is also possible to use the sign%
to indicate the exchange rate fixation before its change to the specified percent;<delay>
— for setting the exchange delay mark. The time is specified in minutes for which the exchange will be delayed;-
<param>
— this tag is used to specify additional icons, such as:manual
— the property must be specified for all non-automatic, non-instant exchange directions (for manual, operator-controlled, etc.);juridical
— this property means that the exchanger transfers money to the user bank account from a juridical account. This icon is applicable only for directions * — Wire;verifying
— this property means that the exchanger can require ID documents from their client in order to perform the exchange operation;cardverify
— this property means that the exchanger can require verification of a bank card;otherin
— receiving customer's funds is being done on a side payment system, not on the one specified in the field from;otherout
— payment of fund to the client is being done from the side payment system, not the one specified in the field to;reg
— to make an exchange the user must register on the site of the exchanger;card2card
— exchanger accepts users' funds by means of Card2Card transfers (not via card merchant). This icon is applicable only for directions Visa/MasterCard — *;delivery
— the exchanger does not have an office in the selected city, payment for courier delivery is included in the exchange rate or displayed by the icon "Additional commission";atm
— the exchange direction is serviced through a cryptomat, a terminal installed in a given city. This icon can be used in exchange directions with cash.
Example:<param>manual, reg</param>
-
<city>
— to specify cities where the exchange exchanges e-currencies into cash or vice versa. It makes sense to specify this field only for cash operations. The export file can have direction with various specified cities. The city codes are listed below.
Example:<city>ANKR</city>
If the conditions for the exchange direction are the same in several cities, it is allowed to indicate several cities separated by commas in one city element within one item element.
Example:<city>ANKR, DUBAI, KIEV</city>
- You do not need to specify constant commissions of payment systems in your rates export file. Our monitoring counts them on its own.
Codes used in the export file
Below you can find the codes for transmission in the export file. If you cannot find the needed code, please contact the support service.
Codes of electronic currencies
|
Codes of cities
|
Example
<?xml version="1.0"?> <rates> <item> <from>USDTTRC20</from> <to>TRX</to> <in>1</in> <out>30.593562</out> <amount>572962.42</amount> <minamount>3</minamount> <maxamount>1000</maxamount> </item> <item> <from>CASHUSD</from> <to>USDCERC20</to> <in>1</in> <out>0.978</out> <amount>2921.42</amount> <minamount>2</minamount> <maxamount>2000</maxamount> <city>ANKR, DUBAI</city> </item> <item> <from>BTC</from> <to>ETH</to> <in>1</in> <out>24.90782568</out> <amount>673.10</amount> <minamount>0.0001</minamount> <maxamount>0.42341216</maxamount> <tofee>1%</tofee> <param>manual, reg</param> </item> <item> <from>BTC</from> <to>CASHUSD</to> <in>1</in> <out>4342.352344</out> <amount>31.90343295</amount> <minamount>1.5</minamount> <maxamount>1000</maxamount> <city>ANKR</city> </item> </rates>
Example link to exported rates file
FAQ for Export rates file
- Our export file is updated every minute. Is this fast enough?
-
No, it is not enough. Our monitoring requests exchange rates every 5-8 seconds, therefore, to increase precision of the data transferred, it is required that your exchanger provides export file which would contain information representing exchange rates equivalent to those on your web page.
One of the following options of export implementation can be used:- A script that generates new export data on every request;
- Static export file being generated every time any change of rates/reserves/commissions occurs on your exchanger web page.
- Rates file is not being parsed, BestChange outputs an error. What can be checked?
- If you have DDoS protection on your site, add the IP address 178.32.48.31, 162.19.29.225, 88.99.97.146 of our robot to the whitelist to prevent access to your exported rates file from being blocked. Also, it is necessary to disable the cashing of the sent files for IP-addresses of our robot.
- What commissions must be rendered in the export file?
-
Your rates in the monitor must take in account:
- All fees connected with sending funds from the exchanger's side, charged to the amount received by the user;
- All fees connected with sending funds from the user's side, with the exception of commissions charged by payment system, if the payment takes place within this payment system.
- Our exchanger has several levels of rates depending on the amount to be exchanged. How should we specify it in our export file?
- Our monitoring does not support multilevel rates. In this case, exchange rates with maximum percentage available should be reported.
- Our exchanger has limits with regard to the maximum amount to be exchanged at a time. How should we specify it in our export file?
-
To implement this, you should make correction of reserves respective to set limits in the exchange directions where the limits are applicable.
Example: Perfect Money USD → PayPal EUR direction is limited to accept maximum of 1000 USD Perfect Money. In this case, you should set 1000 USD reserve in target currency, this is to convert 1000 USD in EUR.
If a limit equal to 0 is set, such directions should not be exported, or their reserve should also be 0.
- Is it possible to set up our display in your list so that we are displayed from Monday to Saturday 9:00 to 19:00, but were not displayed on Sunday?
-
There are 2 ways to do it:
- Set up the export rates generation script so that the export file is cleared automatically (or rates or reserves are set to 0) on the days when you are not working;
- Enable or disable the listing of your exchanger manually using corresponding link in your bestchange.org account.
If you have any questions, you can ask them by contacting us with the help of the methods specified on the contacts page.