Course export file format

This page provides a description of the standard supported by the monitoring service for generating an export file containing exchange directions. To add an exchanger to the listing, you must provide a link to this file hosted on your website. An example of the file content is shown below: XML | JSON | Codes | Examples

Rules for creating XML format

1. Each entry starts on a new line. Line breaks are indicated by the symbol\n.
2. For numerical values, the integer part is separated by a dot.
3. The root element isrates.
4. Each exchange direction is described in the elementitem.
5. Required elements for describing the exchange direction within an elementitem.
  • <from> The currency code that the exchanger accepts from the customer.
  • <to> Currency code that the exchanger sends to the customer.
  • <in> To indicate the exchange rate, how much currencyfromthe customer should give.
  • <out> To indicate the exchange rate, how muchtocurrency the customer will get.
  • <amount> Thetocurrency reserve in the exchanger, the maximum that a client can receive.
  • <minamount> The minimum amount of currency that an exchanger will accept from a customer for exchange. Specified infromcurrency. <minamount>2.4</minamount>
  • <maxamount> The maximum amount of currency that an exchanger accepts from a customer for a single exchange. Specified infromcurrency. <maxamount>1000</maxamount>
6. Additional elements for describing the direction of exchange within an elementitem.
  • <fromfee> An additional fee that is not included in the exchange rate and is charged on the amount that the customer transfers to the exchanger. Specified infromcurrency. <fromfee>1.54</fromfee> It is also possible to use the%character.
  • <tofee> An additional fee that is not included in the exchange rate and is charged on the amount that the exchanger transfers to the customer. Specified intocurrency. <tofee>0.0123</tofee> It is also possible to use the%character.
  • <minfee> Minimum commission, which is calculated for the difference between the amount transferred and the equivalent of the currency received relative to the average exchange rate. Specified infromcurrency. <minfee>2</minfee>
  • <floating> This indicates a fluctuating exchange rate. The value must be specified in minutes to define the period during which the exchange rate remains fixed. If the rate is not fixed for any duration, the value must be set to 0. If the exchanger's rate is fixed until the actual rate fluctuates by a specific percentage, the value can be specified as a percentage using the%symbol. <floating>0.0123</floating>
  • <delay> A parameter indicating deferred exchange. The duration of the delay must be specified in minutes.
  • <param> This element is used to specify additional tags, such as:
    • manual To indicate a manual exchange flag that must be present for exchange directions that are processed manually by an operator.
    • juridical The exchanger transfers funds to the client's bank account from the account of a legal entity or individual entrepreneur.
    • verifying Document and customer identity verification may be required during the exchange.
    • cardverify Card verification is required for exchange.
    • otherin Payments from customers are accepted via a third-party payment system.
    • otherout Payment of funds to the customer is made via a third-party payment system.
    • reg To exchange, the user must register on the exchange website.
    • delivery The exchange office does not have an office in the selected city, courier delivery fees are included in the exchange rate or displayed in the mark.
    • anonim No personal user data or card and identity verification is required to make an exchange.
    • card2card The exchange accepts user funds via Card2Card transfers (not through a card merchant).
    • atm The exchange is carried out via a crypto machine, a terminal installed in this city.
    • floating The exchange rate is not fixed in the application. The exchange amount may change at the time of sending funds to the customer.
    • If there are several marks, they are separated by commas.<param>manual,anonim</param>
  • <city> Used to specify the city for cash exchange destinations.<city>DUBAI</city>. If the exchange conditions are the same in several cities, it is permitted to specify several cities within oneitemelement, separated by commas.<city>DUBAI,ADLD,NSN</city>
  • Additional fees that you charge the customer must be included in thefromfeeandtofeeelements. Or included in the rates.

Rules for creating JSON format

1. It all starts with this design.{"version":"1.3"}
2. Specify a list of currencies. It must consist of pairs in the format "currency code: currency number". The currency number cannot be 0 and must consist of digits from 1 to 0.
{"version":"1.3","currencies":{"list":{"1":"PMUSD","2":"BTC","3":"ETH"}}}
3. The next step is to specify the exchanges. As shown in the example, all exchanges must be listed in the following exact order: exchange -> incoming currency code -> to -> outgoing currency code.
{"version":"1.3","currencies":{"list":{"1":"PMUSD","2":"BTC","3":"ETH"}},"exchange":{"1":{"to":{"2":[],"3":[]}},"2":{"to":{"1":[]}},"3":{"to":{"1":[]}}}}
4. Every course must be a multiple of 1; that is, either 1 = X or X = 1, where X must be a number greater than or equal to 1. There are two ways to specify the exchange rate in the file: the short form and the extended form. Use the short form if no information other than the exchange rate needs to be specified. In all other cases, use the extended form.
{"version":"1.3","currencies":{"list":{"1":"PMUSD","2":"BTC","3": "ETH"}},"exchange":{"1":{"to":{"2":-57.8,"3":8625.983721}},"2":{"to":{"1":{"xr":60}}},"3":{"to":{"1":{"xr":-8594.7463}}}}}
5. Currency reserves, like currencies, are also listed in a list. The list must consist of currency code: reserve pairs. For the currency code, you must specify the code under which the currency appears in the currency list. For the reserve, specify the amount of currency available for exchange. Sometimes it is necessary to specify an individual reserve for a specific exchange; in this case, it should be specified in the amount field in the details for that exchange, as shown in the example below.
{"version":"1.3","currencies":{"list":{"1":"PMUSD","2":"BTC","3": "ETH"},"amounts":{"1":945.54,"2":12500,"3":0.67231509}},"exchange":{"1":{"to":{"2":-57.8,"3":8625.983721}},"2":{"to":{"1":{"xr":60,"amount":300}}},"3":{"to":{"1":-8594.7463}}}}

Example of an XML export file

version 1.0
<rates>
    <item>
        <from>USDTTRC20</from>
        <to>BTC</to>
        <in>68803.827</in>
        <out>1</out>
        <amount>12466826.1055</amount>
        <minamount>500</minamount>
        <maxamount>5000</maxamount>
        <tofee>0.54</tofee>
        <delay>10</delay>
        <param>manual,juridical,verifying</param>
    </item>
    <item>
        <from>BTC</from>
        <to>CASHUSD</to>
        <in>1</in>
        <out>68803.827</out>
        <amount>10</amount>
        <minamount>0.18</minamount>
        <maxamount>9.8</maxamount>
        <city>ANTW</city>
    </item>
</rates>

Example of an JSON export file

version 1.3
{
  "version": "1.3",
  "currencies": {
    "list": {
      "1": "USDTTRC20",
      "2": "CASHUSD",
      "3": "BTC",
      "4": "USDTERC20",
      "5": "ETH",
    },
    "amounts": {
      "1": 334386.07,
      "2": 198000,
      "3": 100.18,
      "4": 2160029,
      "5": 10004.79,
    }
  },
  "exchange": {
    "1": {
      "to": {
        "2": 1,
        "4": {
          "outFee": 4,
          "options": {
            "manual": 0
          },
          "min": 100,
          "max": 20000,
          "xr": 1.005
        }
      },
      "min": 1000,
      "max": 150000
    },
    "2": {
      "to": {
        "1": {
          "outFee": 2,
          "xr": 1.033
        },
        "3": {
          "outFee": 0.00055,
          "min": 1000,
          "max": 150000,
          "xr": 73968.95996
        },
        "4": {
          "outFee": 4,
          "min": 1038,
          "max": 154955,
          "xr": 1.033
        },
        "5": {
          "outFee": 0.004,
          "min": 1000,
          "max": 150000,
          "xr": 2271.96872
        }
      },
      "cities": [
        "DUBAI"
      ],
      "min": 1036,
      "max": 154953
    },
    "3": {
      "to": {
        "2": {
          "cities": [
            "MIAMI"
          ],
          "xr": -71185.054835
        }
      },
      "min": 0.0141,
      "max": 2.1072
    },
    "4": {
      "to": {
        "1": {
          "outFee": 2,
          "options": {
            "manual": 0
          },
          "min": 100,
          "max": 20000,
          "xr": 1.005
        },
        "2": 1
      },
      "min": 1000,
      "max": 150000
    },
    "5": {
      "to": {
        "2": {
          "cities": [
            "BER"
          ],
          "xr": -2186.460618
        }
      },
      "min": 0.4578,
      "max": 68.6045
    }
  },
  "options": {
    "manual": 1
  }
}