An operation getCurrencyRatio returns a currency division ratio type currencyRatio consisting of a numerator and a denominator. The value in milibillons shall be multiplied by the ratio currencyRatio to obtain an amount in the currency. If an invalid currency code is provided, numerator and denominator have a value of 0.
Example SOAP request:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="ns1"> <soapenv:Header/> <soapenv:Body> <ns1:getCurrencyRatio soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <currency xsi:type="xsd:string">PLN</currency> </ns1:getCurrencyRatio> </soapenv:Body> </soapenv:Envelope>
Example SOAP response:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:Bsa="ns1" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Header/> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <Bsa:getCurrencyRatioResponse> <return> <numerator>1</numerator> <denominator>1000</denominator> </return> </Bsa:getCurrencyRatioResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Request parameters:
Parameter | Type | Description | Required? |
currency | string | The currency for which the division ratio is to be returned (e.g.. PLN, GPB, EUR, JPY, etc.) | Yes |
Response parameters:
Name | Type | Description |
currencyRatio | currencyRatio | The currency division ratio |