Permalink: |
Cash Exchanger service interfaces
P-2-P Exchanger interface¶
ListActive method - Get a list of active offers¶
This method allows you to get a list of offers published on the exchange at p2p.exchanger.ru using filtering settings
- SOAP method URL - https://cash.exchanger.ru/srv/serviceforp2p.asmx?op=ListActive
name | description | notes |
reqNumber | request number, a unique whole number no less than the reqNumber of the previous request | |
wmidSigner | WMID of the signer | |
sign | digital signature | reqNumber+transportId+wmidSigner |
transportId | ID: type of exchange | 1- wire, 2- sdp, 3 - reserved, 4 - p2p |
directionId | ID: direction of exchange | 1 - WMZ=>USD, 2 - WMR=>RUB, 5 - WMB=>BYR, 6 - WME=>EUR, 7 - USD=>WMZ, 8 - RUB=>WMR, 11 - BYR=>WMB, 12 - EUR=>WME |
cityId | city ID | |
amountGreater | the amount of the exchange is not less than amountGreater | null or -1 if not specified |
rateDirectGreater | direct rate of no less than rateDirectGreater | null or -1 if not specified |
rateReverseGreater | reverse rate of not less than amountGreater | null or -1 if not specified |
out resultList | list of offers, output parameter | |
out error | error description, output parameter |
- returns true if successfully completed
ListOwn method - Get a list of your own offers¶
This method allows you to get a list of one's own offers on the exchange at p2p.exchanger.ru
- SOAP method URL - https://cash.exchanger.ru/srv/serviceforp2p.asmx?op=ListOwn
name | description | notes |
reqNumber | request number, a unique whole number not less than the reqNumber of the previous request | |
wmidSigner | WMID of the signer | |
sign | digital signature | reqNumber + wmidSigner + status |
status | status of offers to get | [-1] - all offers |
out resultList | list of offers, output parameter | |
out error | error description, output parameter |
- returns true if successfully completed
New method - Creation of a new offer (without publication)¶
Creates a new offer in the p2p section of Cash Exchanger but does not publish it in the exchange lists
- SOAP method URL - https://cash.exchanger.ru/srv/serviceforp2p.asmx?op=New
name | description | notes |
reqNumber | request number, a unique whole number no less than the reqNumber of the previous request | |
wmidSigner | WMID of the signer | |
sign | digital signature | reqNumber+directionId+purseNum+amount+amountWant+insPrem+wmidSigner |
directionId | ID: direction of exchange | |
purseNum | purse | |
amount | amount offered | |
amountWant | amount requested | |
insPrem | insurance payment amount | |
maxTimeForExchange | timeframe in which the exchange should take place (by default, 24 hours) | |
meetDateTime | meeting time | not less than the current time + 1 hour, in the format yyyyMMddHHmm |
address | meeting place, address | |
metro | meeting place, metro station | |
cityId | city ID | |
description | additional information | |
out error | error description, output parameter | |
out offer | public offer, output parameter | |
out uniqId | number of the offer that has been created, output parameter |
- returns true if successfully completed
Publish method - Publish offer in the lists¶
Publication of a previously created offer in the exchange lists
- SOAP method URL - https://cash.exchanger.ru/srv/serviceforp2p.asmx?op=Publish
name | description | notes |
reqNumber | request number, a unique whole number no less than the reqNumber of the previous request | |
wmidSigner | WMID of the signer | |
sign | digital signature | reqNumber+uniqId+wmidSigner |
uniqId | WMID of the signer | |
out error | error description, output parameter | |
out cmdGuid | command GUID, output parameter (used to verify the result) |
- returns true if successfully completed
PublishResult method - Get results for offer publication¶
Getting publication results
- SOAP method URL - https://cash.exchanger.ru/srv/serviceforp2p.asmx?op=PublishResult
name | description | notes |
reqNumber | request number, a unique whole number no less than the reqNumber of the previous request | |
wmidSigner | WMID of the signer | |
sign | digital signature | reqNumber+uniqId+cmdGuid+wmidSigner |
---|---|---|
uniqId | WMID of the signer | |
cmdGuid | command GUID returned by the Publish method | |
out error | error description, output parameter | |
out validationErrors | publication errors, output parameter | |
out status | offer status, output parameter |
- returns true if successfully completed
GetIntentionsList method - Get a list of intentions for exchange by offer number¶
Get a list of intentions for exchange for a selected offer
- SOAP method URL - https://cash.exchanger.ru/srv/serviceforp2p.asmx?op=GetIntentionsList
name | description | notes |
reqNumber | request number, a unique whole number no less than the reqNumber of the previous request | |
wmidSigner | WMID of the signer | |
sign | digital signature | reqNumber + appUniqId + wmidSigner |
---|---|---|
appUniqId | unique number of the direct offer | |
out error | error description | |
out result | list of intentions for exchange |
- returns true if successfully completed
SendIntensions method - Signify your intention for exchange¶
Signify your intention for exchange
- SOAP method URL - https://cash.exchanger.ru/srv/serviceforp2p.asmx?op=SendIntensions
name | description | notes |
reqNumber | request number, a unique whole number no less than the reqNumber of the previous request | |
wmidSigner | WMID of the signer | |
sign | digital signature | reqNumber+appUniqId+purseNumber+wmidSigner |
appUniqId | unique number of the direct offer which is used to make the counteroffer | |
purseNumber | other party's purse number | |
out error | error description | |
out guid | command GUID for making the counteroffer |
- returns true if successfully completed
CounterTrade method - Initialize an exchange based on the selected intention¶
- SOAP method URL - https://cash.exchanger.ru/srv/serviceforp2p.asmx?op=CounterTrade
Initialize an exchange based on the selected intention for exchange (combining a direct offer and intention)
name | description | notes |
reqNumber | request number, a unique whole number no less than the reqNumber of the previous request | |
wmidSigner | WMID of the signer | |
sign | digital signature | reqNumber+appId+purseNumber+wmidSigner |
---|---|---|
appUniqId | unique number of the direct offer which is used to make the counteroffer | |
purseNumber | other party's purse number | |
out error | error description | |
out guid | command GUID for making the counteroffer |
- returns true if successfully completed
CounterTradeResult method - Check the results of exchange initialization¶
- SOAP method URL - https://cash.exchanger.ru/srv/serviceforp2p.asmx?op=CounterTradeResult
name | description | notes |
reqNumber | request number, a unique whole number no less than the reqNumber of the previous request | |
wmidSigner | WMID of the signer | |
sign | digital signature | reqNumber+appId+purseNumber+wmidSigner |
---|---|---|
cmdGuid | command GUID for making the counteroffer | |
uniqId | offer number | |
out error | error description | |
out status | offer status |
- returns true if successfully completed
Using the interface with P-2-P Exchanger¶
Registering an exchange point on Cash Exchanger¶
In order to use the library or web service, you must have a former passport or higher.
You must also be registered on Cash Exchanger. To do this, visit one of the sections on http://cash.exchanger.ru, log in using your WMID and add purses (add the service's WMID to your trusted list).
Generating a key for using the test application¶
After registering you will need to generate an XML key based on the key for your Keeper WinPro.
Download the key generation application here or on the developer's website.
You can find more about how to use the application in WMSignerFX
The result will be an XML key of the following form:
<RSAKeyValue> <Modulus>KEY PART 1</Modulus> <D>KEY PART 2</D> </RSAKeyValue>
Next save the XML key in the key.xml file which will subsequently be fed into the test application.
Test application for using p2p.exchanger.ru¶
The open-source test application can be downloaded here. The test application makes use of the primary ways of calling web methods, such as:
- getting a list of available offers
- getting a list of your own offers
- adding intentions for exchange
- initializing an exchange based on an intention