WebMoney

Wiki

Receiving history of exchange rates

XML-API of receiving history of exchange rates.

  • Request example:
    https://wm.exchanger.ru/asp/XMLQuerysStats.asp?exchtype=1&grouptype=4&yearstats=2011&monthstats=11&daystats=11&hourstats=11
    
  • Request properties:
Name Purpose Description
exchtype exchange type numerical value of the exchange direction
grouptype time interval the minimum interval of time within which it is necessary to receive mean value of exchange rate; has four values: 1- month interval, 2- week interval, 3 - day interval, 4 - hour interval. For example, in case of choosing day interval (value 3) in the result there would be given means values of exchange rate in a specified direction on days.
yearstats year a year for which it is necessary to receive history on values of an average course in the specified direction of exchange. Numerical value in the range from 2003 to 2020, parameter is optional at grouptype =1 value, at all other values of the grouptype parameter is obligatory. Parameter is obligatory at the indication of any of the parametrs monthstats, weekstats, daystats or hourstats parameter
monthstats month month for which it is necessary to receive history on values of an average course in the specified direction of exchange. Numerical value in the range from 1 to 12, parameter is obligatory at grouptype =4 value, at all other values of the grouptype parameter is optional. Parameter is obligatory at the indication of any of the daystats or hourstats parameters.
weekstats week week (one after another in a year) for which it is necessary to receive history on values of an average course in the specified direction of exchange. Numerical value in the range from 1 to 54, parameter is optional at any grouptype value
daystats day day for which it is necessary to receive history on values of an average course in the specified direction of exchange. Numerical value in the range from 1 to 31, parameter is optional at any grouptype value. Parameter is obligatory at the indication of the hourstats parameter
hourstats hour hour for which it is necessary to receive history on values of an average course in the specified direction of exchange. Numerical value in the range from 0 to 23, parameter is optional at any grouptype value.
In case of any optional parameter isn't specified, all results within the last specified parameter will be returned. For example this link there is no hourstats parameter, as a result api will return average rate for each hour of 11.11.2011.
  • Response example
<?xml version="1.0" encoding="WINDOWS-1251"?>
<response>
    <row ratetype="" mindateidms="" sumall="" cntall="" minrate="" maxrate="" avgrate="" maxdateid="" mindateid=""/>
</response>

Response properties:

Name Purpose Description
row
mindateid attribute - the beginning of an interval of time within which calculation of an average course was made
maxdateid attribute - the end of an interval within which calculation of an average course was made
avgrate attribute - is the average exchange rate in specified direction with the interval fromт mindateid to maxdateid included. When calculating the average exchange rate, only deals which are made at the upper limit of the current exchange rate direction (clearing transactions) are recognized.
minrate attribute - at grouptype value = 1,2 or 3 minimum value among all hour avgrate values on an interval from mindateid to maxdateid included, at grouptype=4 the value of attribute is equal to avgrate.
maxrate attribute - at grouptype value = 1,2 or 3 maximum value among all hour avgrate values on an interval from mindateid to maxdateid inclusive, at grouptype=4 the value of attribute is equal to avgrate
cntall attribute - the total amount of transactions produced in the specified exchange direction within an interval from mindateid to maxdateid inclusive
ratetype attribute - can accept values 0 or 1. The direct or back course is defined by this value, it is given in avgrate, minrate, maxrate in this couple. For example for WMZ->WMR or WMR->WMZ (that is exchtype =1 or exchtype=2) the value of the course avgrate, minrate, maxrate will be identically more than 0, but ratetype =0 or ratetype=1. In other words this tag determines what value is more in this couple at the present moment. Special attention needs to be paid for the moments of "turnover" when the course in any couple comes nearer to 1:1 and goes further - in this moment the ratetype is changing positions in such couple.
  • Response Example *
<?xml version="1.0" encoding="WINDOWS-1251"?>
<response>
    <row ratetype="0" mindateidms="1321009200000" sumall="45823.96" cntall="348" minrate="30.5791" maxrate="30.5791" avgrate="30.5791" maxdateid="2011-11-11T11:59:59.997" mindateid="2011-11-11T11:00:00"/>
</response>