Guidelines for programmers and developers

1. XML-interface for reviewing available exchange volumes

WM Exchanger allows to receive information about available exchange volumes, bids, offers and rates in the automated mode. Link to the API: https://wmeng.exchanger.ru/asp/XMLbestRates.asp. API polls and analyzes data every three minutes.
Attributes (fields description):

  • Direct - exchange direction. First currency is the one, subject to the exchange.For example, for WMZ-WMR directions fields that follow show volumes in WMZ taht can be currently exchanged to WMR as per rates, matching each consequent field.
  • BaseRate - basic exchange rate as per Central Bank average rates or its cross-exchange rate. RAte sign (symbol) indicates neccessary/recommended actions, for example to increase or to lower, so you will understand what volume is availablefor exchange as per basic rate.
  • Plus05, Plus1, Plus2, Plus3 percentage (0.5%, 1%, 2%, 3%) relative to the basci rate, tha should be added or deducted from teh basci rate depdending on the symbol next to it.
  • exchtype -numeric encoding of the exchange direcitron (available at the next interfaces).

Data line example:

<row Direct="WMU - WMZ" BaseRate="-5.3065" Plus05="687" Plus1="1578.87" Plus2="1578.87" Plus3="1877.96" />

- means that currently you can exchange 687 WMU to WMZ as per rate, which 0.5% differs from the basic WMU - WMZ rate. That is you deduct 0.5% from the basic rate of 5.3065, so you get 5.2799 - as a rate that you can use to exchange 687 WMU to WMZ right now. In a similiar way you can exchange 1877.96 WMU to WMZ as per 5.3065 -3% = 5.1473.



2. XML-interface for receiving current bids

WM Exchanger allows to receive information about current bids.
Link to the API: https://wmeng.exchanger.ru/asp/XMLWMList.asp?exchtype=1. API polls and analyzes data every minute.
To poll the interface you need to request exchtype parameter at the URL line - it determines the value (from 1 to 46) of the requested exchange type(see previous interface.
Description of the attributes:

  • BankRate - Central Bank rate tag, matchin the exchtype
    • Direction - BankRate tag attribute, meaning exchange direction of the bids, returned by this query


  • WMExchangerQuerys - returned nids list tag
    • amountin - WM amount subject to the exchange
    • amountout - WM amount that a counter bid holder wants to receive
    • inoutrate - direct exchange rate between WM currencies
    • outinrate - back exchange rate between WM currencies


  • Query - specific bid tag
    • id - new bid number
    • amountin - amount to be exchanged
    • amountout - WM amount that a counter bid holder wants to receive
    • inoutrate - Bid direct exchange rate
    • outinrate - back exchange rate
    • procentbankrate - difference , in percents, fro mthe central Bank rate
    • allamountin - amoutn in WM subject to exchange in al lrevious and current bid
    • querydate - most recent changes date


3. XML-interface for New Bids List for the chosen WMID

THE API allows to receive information about new bids of the chosen WMID.
Link to the API: https://wmeng.exchanger.ru/asp/XMLWMList2.asp.

To request the API you need to send the following XML-query by POST method (via the abovementioend URL):
<wm.exchanger.request>
<wmid></wmid>
<signstr></signstr>
<type></type>
<queryid></queryid>
</wm.exchanger.request>

Tags desciption:

  • wmid - 12 digits - WMID , whose bids are to be returned as per query
  • signstr - 132-digits digiatl sugnature (by .kwm keys of the wmid) encoding the value of three tags of the request, sticked together in one line without spaces, "wmid + type + queryid" ( for digital signtarure please see General WM-Interfaces guidelines for developers
  • type - request type, symbol:
    • 0 - return only non-processed bids
    • 1 - retrun processed but not exchanged bids( that are still under exchange)
    • 2 - return only exchanged bids
    • 3 - return all bids
  • queryid - id of the new bid belonging to WMID , which data/details are to be returned; if the parameter is not indicated, last 20 bids of this WMID are returned

Descirption of the attirbutes (fields that are returned by the API):

  • WMExchangerQuerys - general bids return tag
    • wmid - WMID, publishing a bid
    • type - query tupe


  • Query - specific bid tag
    • id - reference number of the new bid for exchange
    • exchtype - exchange direction, see interface # X1
    • state - current status of the bid
      • 0 - bid not processed
      • 1 - processed, under exchange
      • 2 - exchanged completely
      • 3 - combined with new bid
      • 4 - removed, funds not returned
      • 5 - removed, funds retruned

    • amountin - remaining amount in WM to be exchanged
    • amountout - remaining amount in WM to be received after tyhe exchange
    • inoutrate - direct exchange rate for the current bid
    • outinrate - back exchange rate for the current bid
    • inpurse - Purse, from which the bid was processed
    • outpurse - purse to receive exchanged funds
    • querydatecr - bid application date
    • querydate - most recent changes
    • direction - exchange direction


4. XML-interface for reviewing the counter bids of the specific WMID

ThisAPI allows to received information about counter bids of the specific WMID in the automated mode.
Link to the API: https://wmeng.exchanger.ru/asp/XMLWMList3.asp.

To request the API you need to send the following XML-query by POST method (via the abovementioend URL):
<wm.exchanger.request>
<wmid></wmid>
<signstr></signstr>
<type></type>
<queryid></queryid>
</wm.exchanger.request>

Query tags desciption:

  • wmid - 12 digits - WMID, which сounter-bids are to be returned in the query
  • signstr - 132-digits digital signature (by .kwm keys of the wmid) encoding the value of three tags of the request, sticked together in one line without spaces, "wmid + type + queryid" ( for digital signtarure please seeGeneral WM-Interfaces guidelines for developers)
  • type - query type, reserved for future use. currently n/a
  • queryid - id of the counter bid belonging to WMID , which data/details are to be returned; if the parameter is not indicated, last 20 bids of this WMID are returned

Descirption of the attirbutes (fields that are returned by the API):

  • WMExchangerQuerys - tag ofthe general list of the returned bids
    • wmid - WMID of the bid
    • type - query type


  • Query - tag of the specific bid
    • id - number of the counter bid
    • isxid - number of the new bid as per the counter bid
    • exchtype - exchange direction, see interface # X1
    • state - current status
      • 0 - bid not processed
      • 1 - processed, exchange performed, funds not yet processed
      • 2 - exchanged completely, funds processed
      • 3 - exchange not processed, bid converted into the new bid for the same wmid(possible reasons: echange couldn't have been performed for any reasons, rate of the new bid has changed or there were not enough funds to cover the counter bid)

    • amountin - amount in WM, exchanged in the specific counter bid
    • amountout - amount in WM received by WMID as per specific counter bid
    • inoutrate - direct exchange rate of the bid
    • outinrate - back exchange rate of the bid
    • inpurse - Purse, from which the bid was processed
    • outpurse - purse to receive exchanegd funds
    • querydatecr - bid application date
    • querydate - most recent changes date
    • direction - exchange direction


5. XML-interface for removing/deleting the new bid of the specific WMID

The APi allows to delete new bid, belonging to specific WMID with return remaining (not exchanged) funds back to the account.
Link to the API https://wmeng.exchanger.ru/asp/XMLTransDel.asp.

To request the API you need to send the following XML-query by POST method (via the abovementioend URL):
<wm.exchanger.request>
<wmid></wmid>
<signstr></signstr>
<operid></operid>
</wm.exchanger.request>

Query tags desciption:

  • wmid - 12 digits -WMID, which bid is to be deleted when query is received
  • signstr - 132-digits digital signature (by .kwm keys of the wmid) encoding the value of two tags of the request, sticked together in one line without spaces, "wmid + operid" ( for digital signtarure please see General WM-Interfaces guidelines for developers)
  • operid - id of the bid belonging to WMID , which is to be deleted and funds returned back to the purse

Descirption of the attirbutes (fields that are returned by the API):

  • retval - "0" if operation is successful, other digits showing an error
  • retdesc - error description of the RetVal retval tag is not 0


6. XML-interface for changing the exchange rate of the new bid of the specific WMID

Interface allows to update the exchange rate of the specific WMID.
Link to the interface https://wmeng.exchanger.ru/asp/XMLTransIzm.asp.

To request the API you need to send the following XML-query by POST method (via the abovementioend URL):
<wm.exchanger.request>
<wmid></wmid>
<signstr></signstr>
<operid></operid>
<curstype></curstype>
<cursamount></cursamount>
</wm.exchanger.request>

Description of the attirbutes (fields that are returned by the API):

  • wmid - 12 digits - WMID, which bid is to be changed as per the query
  • signstr - 132-digits digital signature (by .kwm keys of the wmid) encoding the value of four tags of the request, sticked together in one line without spaces, "wmid + operid + curstype + cursamount" ( for digital signtarure please see General WM-Interfaces guidelines for developers)
  • operid - reference number ofthe new bid, placed by a WMID, exchange rate subject to change
  • cursamount - new exchange rate of the operid, both direct and counter
  • curstype - exchange type at the cursamount tag, where "0" - direct rate (amount to be exchanged against amount to be received) and back rate (amount to be received against amount placed for exchange)

Descirption of the attirbutes (fields that are returned by the API):

  • retval - "0" exchanged successfully, otherwise digits show an error
  • retdesc - error description if RetVal tag is not equal to 0


7. XML-interface for combining two new bids

The API allows to combine 2 new bids in the automated mode.
Link to the API:https://wmeng.exchanger.ru/asp/XMLTransUnion.asp.

To request the API you need to send the following XML-query by POST method (via the abovementioend URL):
<wm.exchanger.request>
<wmid></wmid>
<signstr></signstr>
<operid></operid>
<unionoperid></unionoperid>
</wm.exchanger.request>

Описание тэгов запроса:

  • wmid - 12 цифр - ВМ-идентификатор, чьи новые заявки необходимо объединить в результате запроса интерфейса
  • signstr - 132-символьная цифровая подпись (ключами .kwm идентификатора wmid) значений 3-х тэгов запроса склееных в одну строку без пробелов "wmid + operid + unionoperid" (формирование цифровой подписи см. в описании общих ВМ-интерфейсов для разработчиков)
  • operid - номер, выставленной идентификатором wmid, новой заявки, к которой необходимо присоединить заявку unionoperid
  • unionoperid - номер, выставленной идентификатором wmid, новой заявки, которую необходимо присоединить к заявке operid, при этом обе суммы к обмену будут объеденены и курс получившейся заявки operid останется прежним

Описание возвращаемых интерфейсом полей (тэгов):

  • retval - "0" в случае успешного выполнения операции, цифровое обозначение ошибки противном случае
  • retdesc - описание ошибки в случае если тэг RetVal не равен 0


8. XML-интерфейс постановки новой заявки на обмен

В секции реализован XML-интерфейс для автоматической постановки на обмен новой заявки.
URL интерфейса https://wmeng.exchanger.ru/asp/XMLTrustPay.asp.

Для запроса интерфейса по указанному URL необходимо передать методом POST следующий XML-запрос:
<wm.exchanger.request>
<wmid></wmid>
<signstr></signstr>
<inpurse></inpurse>
<outpurse></outpurse>
<inamount></inamount>
<outamount></outamount>
</wm.exchanger.request>

Описание тэгов запроса:

  • wmid - 12 цифр - ВМ-идентификатор, с которого будет выставляться новая заявка
  • signstr - 132-символьная цифровая подпись (ключами .kwm идентификатора wmid) значений 5-ти тэгов запроса склееных в одну строку без пробелов "wmid + inpurse + outpurse + inamount + outamount" (формирование цифровой подписи см. в описании общих ВМ-интерфейсов для разработчиков)
  • inpurse - номер кошелька ВМ-идентификатора wmid, с которого необходимо взять сумму к обмену для постановки заявки, на данный кошелек должно быть установлено доверие на выполнение переводов от имени идентификатора сервиса системы WMT - WM#128984249415 - секции wm.exchanger
  • outpurse - номер кошелька ВМ-идентификатора wmid, на который будут поступать средства по мере обмена
  • inamount - сумма, которая будет автоматически переведена с кошелька inpurse на кошелек сервиса секции wm.exchanger и выставлена к обмену
  • outpurse - суммая, которую необходимо перевести на кошелек outpurse по завершению обмена

Описание возвращаемых интерфейсом полей (тэгов):

  • retval - "0" в случае успешного выполнения операции, цифровое обозначение ошибки противном случае. При успешном результате в атрибутах тэга RetVal находятся номер посталвенной заявки (атрибут operid) и номер транзакции в WMT (атрибут wmtransid).
  • retdesc - описание ошибки в случае если тэг RetVal не равен 0


9. XML-интерфейс скупки из своей новой заяки чужой новой противоположной по направлению обмена.

В секции реализован XML-интерфейс для автоматической покупки из своей новой заявки чужой новой, противоположной по направлению обмена.
URL интерфейса https://wmeng.exchanger.ru/asp/XMLQrFromTrIns.asp.

Для запроса интерфейса по указанному URL необходимо передать методом POST следующий XML-запрос:
<wm.exchanger.request>
<wmid></wmid>
<signstr></signstr>
<isxtrid></isxtrid>
<desttrid></desttrid>
</wm.exchanger.request>

Описание тэгов запроса:

  • wmid - 12 цифр - ВМ-идентификатор, чья новая заявка номер isxtrid будет использоваться для покупки чужой заявки.
  • signstr - 132-символьная цифровая подпись (ключами .kwm идентификатора wmid) значений 3-х тэгов запроса склееных в одну строку без пробелов "wmid + isxtrid + desttrid" (формирование цифровой подписи см. в описании общих ВМ-интерфейсов для разработчиков)
  • isxtrid - номер, выставленной идентификатором wmid, новой заявки, c которой будет производится покупка чужой заявки номер desttrid
  • desttrid - номер чужой заявки, которую необходимо купить

Описание возвращаемых интерфейсом полей (тэгов):

  • retval - "0" в случае успешного выполнения операции, цифровое обозначение ошибки противном случае
  • retdesc - описание ошибки в случае если тэг RetVal не равен 0