银行API/协议

发布于 2024-09-14 13:24:31 字数 1539 浏览 7 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

凹づ凸ル 2024-09-21 13:24:31

在网络上查找开放金融交换 (OFX) 格式。 (我相信)这是银行业的通用格式。

Look up the Open Financial Exchange (OFX) format on the web. That (I believe) is a generic format for the banking industry.

云淡风轻 2024-09-21 13:24:31

API 访问

您需要咨询每个机构是否提供用于直接访问的 API。有些将通过拨号线路提供访问,其他则提供更现代的基于 IP 的服务。每个都可能要求您注册并支付费用。

更简单的方法是要求用户从银行下载对账单并将其导入到您的应用程序中。大多数网上银行系统都提供此功能。

格式

无论哪种方式,银行都支持多种格式(取自此处)。

  • OFX(开放金融交换)
  • QIF(快速交换格式)
  • CSV(逗号分隔值)

您可能会看到 OFX 称为 Quickbooks、Microsoft Money 2005 或 Sage Line 50。QIF 有时称为 Quicken 98 或 2000,或 Microsoft Money 2003。

CSV 格式将是每个机构专有的,并且需要为每个实例开发解析逻辑。

谁使用什么格式

支持 OFX 或 QIF 格式的英国银行有:

  • Abbey(QIF,但不是 Abbey Business)
  • Alliance 和 Leicester(OFX 和 QIF)
  • Barclays (OFX)
  • Clydesdale (QIF)
  • Coutts & Co. Co(OFX 和 QIF)
  • First Direct (QIF)
  • 哈利法克斯(OFX 和 QIF)
  • 汇丰银行(OFX)
  • 劳埃德银行(QIF)
  • NatWest(OFX)
  • Nationwide(OFX)
  • 苏格兰皇家银行(OFX 和 QIF)
  • Tesco(OFX 和 QIF)
  • 约克郡( QIF)

API access

You will need to check with each institution if they provide an API for direct access. Some will provide access over a dial-up line, others have more modern IP based service. Each will likely require you to register and pay a fee.

Easier is to require the user to download their statement from the bank and import it into your application. Most online banking systems provide this functionality.

Formats

Either way, there are several formats supported by banks (taken from here).

  • OFX (Open Financial Exchange)
  • QIF (Quicken Interchange Format)
  • CSV (Comma-Separated Value)

You might see OFX referred to as Quickbooks, Microsoft Money 2005 or Sage Line 50. QIF is sometimes called Quicken 98 or 2000, or Microsoft Money 2003.

CSV formats will be proprietary per institution and require parsing logic developed for each instance.

Who uses what format

The UK banks that support OFX or QIF formats are:

  • Abbey (QIF, but not Abbey Business)
  • Alliance and Leicester (OFX and QIF)
  • Barclays (OFX)
  • Clydesdale (QIF)
  • Coutts & Co (OFX and QIF)
  • First Direct (QIF)
  • Halifax (OFX and QIF)
  • HSBC (OFX)
  • Lloyds (QIF)
  • NatWest(OFX)
  • Nationwide (OFX)
  • Royal Bank of Scotland (OFX and QIF)
  • Tesco (OFX and QIF)
  • Yorkshire (QIF)
烟织青萝梦 2024-09-21 13:24:31

可以编写一个基本的屏幕抓取工具来从您的 Mint.com 帐户中提取帐户交易。当然,这意味着您必须在那里设置一个帐户,并让他们为您做肮脏的工作。

CasperJS 是一个很棒的工具,它使这变得相当简单,您需要安装 Casper 和 PhantomJS,它是构建的框架在。

var casper = require('casper').create();

casper.start('https://wwws.mint.com/login.event', function() {
    this.fill('form#form-login', {
        username: 'mintusername',
        password: 'mintpassword'
    }, true);
}).then(function() {
    this.echo('Downloading transaction history...')
    this.download('https://wwws.mint.com/transactionDownload.event', '/path/to/save/transactions.csv');
});

casper.run(function() {
    this.echo('Done.').exit();
});

此脚本登录您的 Mint 帐户,并下载您的交易历史记录(作为 CSV 文件)到您指定的任何地方。从那里,您可以对数据执行您喜欢的操作。当然,这个脚本可以显着扩展以执行更高级的操作,或者过滤它下拉的事务,但作为最佳实践,我建议保持屏幕抓取尽可能简单,并在程序末尾添加逻辑。

您可以使用 launchd(适用于 Mac OS X)或 cron(适用于大多数 Linux 风格)定期运行此脚本。

It is possible to write a basic screen scraper to pull account transactions from your Mint.com account. Of course, this means you'll have to have an account set up there and let them to the dirty work for you.

CasperJS is a great tool that makes this fairly trivial, you will need to install both Casper and PhantomJS, the framework it is built on.

var casper = require('casper').create();

casper.start('https://wwws.mint.com/login.event', function() {
    this.fill('form#form-login', {
        username: 'mintusername',
        password: 'mintpassword'
    }, true);
}).then(function() {
    this.echo('Downloading transaction history...')
    this.download('https://wwws.mint.com/transactionDownload.event', '/path/to/save/transactions.csv');
});

casper.run(function() {
    this.echo('Done.').exit();
});

This script logs into your Mint account, and downloads your transaction history (as a CSV file) to wherever you specify. From there, you can do what you like with the data. Of course, this script could be expanded significantly to do more advanced things, or to filter the transactions it pulls down, but as a matter of best practice I would advise keeping the screen scraping as simple as possible and add the logic on your program's end.

You can have this script run periodically using launchd for Mac OS X or cron for most Linux flavors.

最笨的告白 2024-09-21 13:24:31

Intuit 正在推出新的数据服务,可通过安全 API 访问超过 18000 家金融机构。我不知道它们是否会包括英国银行和金融机构,但这里是链接:

https:// developer.intuit.com/page/CustomerAccountData

Intuit are lauching new data services with access to over 18000 financial institutions via secure apis. I am not privy as to whether they will include UK banksand financial institutions, but here is the link:

https://developer.intuit.com/page/CustomerAccountData

白日梦 2024-09-21 13:24:31

您可以尝试 Swift (请参阅消息类型),但这不是你可以直接设置的事情,你必须与你想要合作的每个机构进行交谈。

You could try Swift (see message types), its not the kind of thing you can just set up though, you'd have to speak to each institution you wanted to work with.

陌上青苔 2024-09-21 13:24:31

有一个称为 OFX (ofx.net) 的标准协议可能会满足您的需求。 Microsoft Money 和 Quicken 都使用它来更新数据。

There is a standard protocol known as OFX (ofx.net) that might meet your needs. Microsoft Money and Quicken both use it to update data.

双马尾 2024-09-21 13:24:31

对于那些不太关心支付 5 美元购买 OFX 转换器(旨在处理全国 FlexAccount、电子储蓄和信用卡)的人,请尝试 全国 OFX 转换器

对于其他银行和信用卡,请尝试 iCreateOFX Basic,对于投资文件,请尝试 iCreateOFX 投资

For those not overtly concerned about paying a fiver for an OFX converter, designed to handle Nationwide FlexAccount, e-Savings and Creditcards try the Nationwide OFX Converter.

For other banks and creditcards try iCreateOFX Basic and for Investment files try iCreateOFX Investment.

清晰传感 2024-09-21 13:24:31

在欧洲,您可以使用 www.agregadorfinanciero.com API。

In Europe, you could use www.agregadorfinanciero.com API.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文