Skip to content

Rates file

All your rates in one file. The robot fetches it by itself.

How it is built

  • The format is XML or JSON by the BestChange standard.
  • Do you already give such a file to another monitoring service? It will do.
  • One exchange direction is one item block.
  • Write a fraction with a dot. We cannot read a number with a comma or a space.
  • The encoding is UTF-8.

XML example

<?xml version="1.0" encoding="UTF-8"?>
<rates>
  <item>
    <from>SBERRUB</from>
    <to>USDTTRC20</to>
    <in>92.5</in>
    <out>1</out>
    <amount>250000</amount>
    <minamount>5000</minamount>
    <maxamount>500000</maxamount>
    <param>manual, cardverify</param>
    <tofee>1</tofee>
    <floating>15</floating>
    <delay>30</delay>
  </item>
  <item>
    <from>USDTTRC20</from>
    <to>CASHRUB</to>
    <in>1</in>
    <out>91.2</out>
    <amount>3000000</amount>
    <minamount>1000</minamount>
    <maxamount>30000</maxamount>
    <city>MSK, SPB</city>
  </item>
</rates>
Fields12
FieldWhat it isExampleIf there is a mistake
fromThe code of the currency the client gives.SBERRUBThe code is not in the list — we do not take the row.
toThe code of the currency the client gets.USDTTRC20The code is not in the list — we do not take the row.
inHow much the client gives.92.5Zero — the direction is off. Not a number — we do not take the row.
outHow much the client gets for it.1Zero — the direction is off. Not a number — we do not take the row.
amountThe reserve: how much you can pay out.250000Zero or less than the minimum — we do not show the row.
minamountThe smallest amount of an exchange.5000More than the maximum — we do not take the row.
maxamountThe largest amount of an exchange.500000Not a number — we do not take the row.
cityThe city code. Needed for cash. Several codes may be separated by commas.MSK, SPBCash without a city or a city without cash — we do not take the row.
paramLabels separated by commas: manual — a manual exchange, cardverify — a card check.manual, cardverifyWe skip a label we do not know. The row works.
tofeeA fee on top of the rate, taken from the payout: a number or a percent. From the payment — fromfee.1Not a number and not a percent — we do not take the row.
floatingA floating rate. The number is for how many minutes you hold it.15Not a number — the label stays, we do not show the minutes.
delayThe delay of an exchange, in minutes.30Not a number — the label stays, we do not show the minutes.

We do not take a row with a mistake. The other rows of the file work.

The same in JSON

JSON example

{
  "version": 1,
  "rates": [
    {
      "from": "SBERRUB",
      "to": "USDTTRC20",
      "in": 92.5,
      "out": 1,
      "amount": 250000,
      "frommin": 5000,
      "frommax": 500000,
      "manual": true,
      "cardverify": true
    },
    {
      "from": "USDTTRC20",
      "to": "CASHRUB",
      "city": "MSK",
      "in": 1,
      "out": 91.2,
      "amount": 3000000,
      "frommin": 1000,
      "frommax": 30000
    }
  ]
}

In JSON the minimum and maximum are frommin and frommax. Each label is a field of its own: "manual": true.

NextCurrency codes