一、四个子接口覆盖全场景该API提供了四个子接口满足不同业务需求本文重点讲解第四个接口——银行汇率实时查询二、支持的银行列表银行名称编码工商银行ICBC中国银行BOC农业银行ABCHINA交通银行BANKCOMM建设银行CCB招商银行CMBCHINA光大银行CEBBANK浦发银行SPDB兴业银行CIB中信银行ECITIC三、实战演示下面通过 C# 代码调用该接口接口地址https://market.aliyun.com/detail/cmapi00065831 using System; using System.IO; using System.Net; using System.Text; using System.Security.Cryptography.X509Certificates; public class ExchangeRateTest { private const string host https://market.aliyun.com/detail/cmapi00065831; private const string path /bank; private const string method GET; private const string appcode 你自己的AppCode; // 替换为真实 AppCode public static void Main(string[] args) { string querys bank_codeICBC; string url host path; if (!string.IsNullOrEmpty(querys)) { url url ? querys; } HttpWebRequest httpRequest null; HttpWebResponse httpResponse null; if (host.Contains(https://)) { ServicePointManager.ServerCertificateValidationCallback new RemoteCertificateValidationCallback(CheckValidationResult); httpRequest (HttpWebRequest)WebRequest.CreateDefault(new Uri(url)); } else { httpRequest (HttpWebRequest)WebRequest.Create(url); } httpRequest.Method method; httpRequest.Headers.Add(Authorization, APPCODE appcode); try { httpResponse (HttpWebResponse)httpRequest.GetResponse(); } catch (WebException ex) { httpResponse (HttpWebResponse)ex.Response; } Console.WriteLine(httpResponse.StatusCode); Stream st httpResponse.GetResponseStream(); StreamReader reader new StreamReader(st, Encoding.GetEncoding(utf-8)); string result reader.ReadToEnd(); Console.WriteLine(result); } public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) { return true; } }