Exchanger Buy Inverse

XML-API for automatic purchase from one’s own new bid the other person's new bid which is opposite to the exchange direction.

<?xml version=\"1.0\"?>
<wm.exchanger.request>
    <wmid></wmid>
    <signstr></signstr>
    <isxtrid></isxtrid>
    <desttrid></desttrid>
    <deststamp></deststamp>
    <capitallerwmid></capitallerwmid>
</wm.exchanger.request>
  • Request parameters:
name purpose comments
wmid Signer's WMID WMID from which a new bid will be placed.
signstr Request signature. 132-digits digital signature (by .kwm keys of the wmid) encoding the value of three tags of the request, pulled together in one line without spaces, "wmid + isxtrid + desttrid"
isxtrid number of new bid which is set by WMID from which there would be a purchase of another person's bid number
desttrid number on another person’s bid which is is necessary to buy
deststamp the number is equal to the sum of an hour, minute and second from bid’s date to be purchased (querydate in interface 2)/ In case if the bid to exchange has been changed and has different time(another sum of of an hour, minute and second) so transaction would be declined. For compatibility in this parameter there is no need to send anything or send number 1001, in that case the verification of the change of this bid will not be made.
capitallerwmid optional field if Capitaller’s WMID is being transferred in this field (www.capitaller.ru) the exchange bid on behalf of capitallerwmid may be set under this request. In this case there must be an access for WMID which signs the request which is described at Capitaller’s Impersonalization page.
  • Response format:
<?xml version=\"1.0\"?>
<wm.exchanger.response>
    <retval></retval>
    <retdesc></retdesc>
</wm.exchanger.response>
  • Response parameters
Name Purpose Description
retval Execution code "0" means that the request was executed successfully. Check the execution code table for detailed information
retdesc Execution code description error description in case retval tag is not 0
capitallerwmid
  • Example
<?xml version=\"1.0\"?>
<wm.exchanger.request>
    <wmid>500000000008</wmid>
    <signstr>
        7bdb9ae64f5c0d568566a198b8c46c4be181085e898c4fafa1033968bb2762c96444c01db68b6ecc2d8ed0a312d1c5091907a8ba59d11854cc7f9560426bd060019b
    </signstr>
    <isxtrid>27761393</isxtrid>
    <desttrid>27761393</desttrid>
    <deststamp>1001</deststamp>
    <capitallerwmid>0</capitallerwmid>
</wm.exchanger.request>

<?xml version=\"1.0\"?>
<wm.exchanger.response>
    <retval>0</retval>
    <retdesc></retdesc>
</wm.exchanger.response>
  • Execution/Error Codes
Code Description
-10 The client wmid is not specified
-11 Error occurred during the signature verification, tag signstr
-12 Error when specifying the bid number which needs to be changed
-14 Signature verification failed.%Str%
-15 Error - Failed loading XML with query parameters
1 One of the bids has already been redeemed or does not have sufficient funds to exchange.
3 The original bid, with which will buying process, does not have enough funds to exchange.
4 The purchase is not made, try again and if that doesn't work contact the Administrator
31 An bid that will be purchased does not have enough funds to exchange.
32 The original bid, with which will buying process, does not belong to your WMID
33 Exchange rate of the transaction is very different from the market rate.
41 Result return error, try again
45 Low liquidity, mass buying is impossible.
51 Error occurred (database level), descrition:
128 Error occurred (unknown)