(1)显示汇率列表 DC*CUR 显示所有国家的币种的汇率 DC*CUR/F 显示国家名字是F开头的币种的汇率,如: -------------------- COUNTRY CURRENCY CODE DECIMALS RATE FALKLAND ISLAND POUND FKP 2 0.58458865 BSR FAROE ISLANDS KRONE DKK 0 4.90820206 BSR FIJI DOLLAR FJD 2 1.63148896 BSR FINLAND EURO EUR 2 0.65787015 BSR FRANCE EURO EUR 2 0.65787015 BSR FRENCH GUIANA EURO EUR 2 0.65787015 BSR FRENCH POLYNESI FRANC XPF 0 78.50476338 BSR FRENCH SOUTHERN EURO EUR 2 0.65787015 BSR END ITEM -------------------- 该ipcc币种是CAD,那么1 CAD=0.65787015 EUR
DC*US/CUR/F 指定国家,假设在美国,各种汇率 -------------------- COUNTRY CURRENCY CODE DECIMALS RATE FALKLAND ISLAND POUND FKP 2 0.76063511 BSR *** EFFECTIVE 21SEP NEW RATE 0.76038611 BSR FAROE ISLANDS KRONE DKK 0 6.38628689 BSR *** EFFECTIVE 21SEP NEW RATE 6.38895858 BSR FIJI DOLLAR FJD 2 2.12280514 BSR *** EFFECTIVE 21SEP NEW RATE 2.12238396 BSR FINLAND EURO EUR 2 0.85598503 BSR *** EFFECTIVE 21SEP NEW RATE 0.85636549 BSR FRANCE EURO EUR 2 0.85598503 BSR *** EFFECTIVE 21SEP NEW RATE 0.85636549 BSR FRENCH GUIANA EURO EUR 2 0.85598503 BSR *** EFFECTIVE 21SEP NEW RATE 0.85636549 BSR FRENCH POLYNESI FRANC XPF 0 102.1461488 BSR *** EFFECTIVE 21SEP NEW RATE 102.19154974 BSR FRENCH SOUTHERN EURO EUR 2 0.85598503 BSR *** EFFECTIVE 21SEP NEW RATE 0.85636549 BSR END ITEM --------------------
(2)某种币种 DC*CNY -------------------- COUNTRY CURRENCY CODE DECIMALS RATE CHINA RENMINBI CNY 0 0.87377097 BSR END ITEM -------------------- 该ipcc币种是HKD,那么1HKD=0.87377097 CNY
DC*US/CNY 在美国,对人民币的汇率,也就是美元对人民币的汇率。 -------------------- COUNTRY CURRENCY CODE DECIMALS RATE CHINA RENMINBI CNY 0 6.86547148 BSR *** EFFECTIVE 21SEP NEW RATE 6.85460608 BSR END ITEM -------------------- 还有这种NEW RATE的提示。现在是该ipcc所在地的9月20号。现在汇率还是6.865,第二天将变为6.854
(3)直接转换 DC¥CAD500.00/EUR 结果如 ---------------------------- RATE BSR 1CAD - 0.65787015 EUR EUR 328.935 TRUNCATED EUR 329.00 ROUNDED UP TO NEXT 1 - FARES EUR 328.94 ROUNDED UP TO NEXT 0.01 - TAXES ----------------------------
换另外一个ipcc,结果是 ---------------------------- RATE BSR 1CAD - 0.66131028 EUR EUR 330.655 TRUNCATED EUR 331.00 ROUNDED UP TO NEXT 1 - FARES EUR 330.66 ROUNDED UP TO NEXT 0.01 - TAXES ---------------------------- 上面几个命令都是,换ipcc的话,汇率数字会略有不同。
================================================================ 接口的话,用这个
<DisplayCurrencyRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ReturnHostCommand="true" TimeStamp="2012-01-12T11:00:00-06:00" Version="2.1.0"> <CountryCode>CN</CountryCode> <CurrencyCode>USD</CurrencyCode> </DisplayCurrencyRQ>
<DisplayCurrencyRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01" Version="2.1.0"> <stl:ApplicationResults status="Complete"> <stl:Success timeStamp="2018-09-20T22:19:26-05:00"> <stl:SystemSpecificResults> <stl:HostCommand LNIATA="5DE452">DC*CN/USD</stl:HostCommand> </stl:SystemSpecificResults> </stl:Success> </stl:ApplicationResults> <Country Name="UNITED STATES" RPH="1"> <CurrencyCode>USD</CurrencyCode> <CurrencyName>DOLLAR</CurrencyName> <DecimalPlaces>2</DecimalPlaces> <Rate Type="BSR">0.14598075</Rate> </Country> </DisplayCurrencyRS>
可以看到,命令是DC*CN/USD,人民币转美元的汇率,1 RMB = 0.14588 USD 把请求里的USD换成CUR,就可以得到人民币到各种币种的汇率了。
|