Prepare the exchange rate export file for BestChange
Updated December 5, 2026
Your exchanger platform publishes the file that BestChange reads. It must reflect the rates and conditions on your site. Exrule supplies calculated rates to your platform through a separate XML file.
BestChange requirements and API limits are documented here. Check the requirements for the format your listing uses. BestChange account · BestChange API documentation · BestChange EREF requirements · Older BestChange XML standard
Choose the format for your listing
The example below uses EREF 1.1 fields from the newer BestChange integration documentation, which supports XML and JSON. The older export standard describes XML. Check which standard your listing uses before changing fields or switching to JSON.
- XML or JSON. In XML the root element is rates, one item per trading pair.
- Required per pair: from and to are the source and target currency codes; in and out define the rate. amount is the reserve in the target currency. frommin and frommax are order limits in the source currency.
- Optional: recipient-side limits, fees and flags such as manual. A city code is required for cash pairs.
- Element names are lower case. Numbers are plain decimals with a dot: 1500 or 0.0025, no exponent, signs or spaces.
Example
<?xml version="1.0" encoding="UTF-8"?>
<rates>
<item>
<from>CODE_A</from>
<to>CODE_B</to>
<in>1</in>
<out>41.63</out>
<amount>250000</amount>
<frommin>50</frommin>
<frommax>5000</frommax>
</item>
</rates> Illustrative values. CODE_A and CODE_B are placeholders, not valid currency codes. Replace them with codes from the official list.
Serving the file
- UTF-8 encoding.
- Content-Type application/xml for XML or application/json for JSON (JSON is recognised only with application/json).
- HTTP 200; 304 Not Modified is fine. ETag or Last-Modified headers are recommended.
- If you use DDoS protection, whitelist the monitoring service’s robot addresses listed in their docs and disable caching for them.
How often to update
The monitoring service polls the file every few seconds, so a cron job once a minute is not enough. Either generate the file on every request or regenerate it whenever a rate, reserve or fee changes.
Check file and pair errors
Check the HTTP status, Content-Type and XML structure first. An unsupported content type or malformed XML/JSON can make the whole file unreadable. HTTP 304 is an allowed response to a conditional request. Pair validation errors appear in the exchanger account; an invalid pair is not displayed.
Connect Exrule to your platform
Exrule calculates rates by your rules and publishes XML for your platform to fetch. Your platform imports those rates and produces its own file for BestChange with reserves, order limits and other required conditions. Exrule does not send calculated rates or XML to BestChange.