Open Financial Exchange (OFX) XML Specification

This article provides an overview of the Open Financial Exchange (OFX) XML specification, a standardized data format used to transmit financial data between institutions and software applications. It explores the history and technical framework of OFX, its transition to standard XML, the core financial workflows it supports, and its role alongside modern financial APIs.

What is Open Financial Exchange (OFX)?

Open Financial Exchange (OFX) is an open standard created in 1997 through a collaboration between Microsoft, Intuit, and CheckFree. It was designed to establish a unified framework for exchanging financial data electronically between financial institutions, businesses, and consumer financial management software (such as Intuit QuickBooks, Quicken, and various ERP systems).

Before OFX, financial institutions used proprietary data formats, requiring software developers to build custom integration pipelines for every bank. OFX solved this fragmentation by defining standard structures for requests and responses across common banking activities.

The Evolution to XML (OFX 2.x)

The original implementation, OFX 1.x, utilized a custom format based on SGML (Standard Generalized Markup Language) with implicit closing tags to minimize payload size over slow internet connections.

With the release of OFX version 2.0, the standard fully transitioned to pure XML (Extensible Markup Language). This shift introduced several key advantages:

How the OFX Protocol Works

OFX operates on a client-server request/response model, typically communicated over secure HTTP (HTTPS).

  1. Request: The client (such as personal finance software) sends an OFX request containing authentication credentials and specific query parameters (e.g., requesting all settled transactions for an account between two dates).
  2. Authentication: The server validates the user’s credentials alongside client identification tags (such as application ID and version).
  3. Response: The server returns an OFX XML document containing structured data envelopes containing the requested transactions, balances, or error codes.

Core Message Sets Supported by OFX

The OFX specification defines distinct message sets tailored to specific financial domains:

Structure of an OFX XML Document

An OFX XML document is organized hierarchically:

<?xml version="1.0" encoding="UTF-8"?>
<?OFX OFXHEADER="200" VERSION="220" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?>
<OFX>
  <SIGNONMSGSRSV1>
    <SONRS>
      <STATUS>
        <CODE>0</CODE>
        <SEVERITY>INFO</SEVERITY>
      </STATUS>
      <DTSERVER>20231024120000.000[-5:EST]</DTSERVER>
      <LANGUAGE>ENG</LANGUAGE>
    </SONRS>
  </SIGNONMSGSRSV1>
  <BANKMSGSRSV1>
    <STMTTRNRS>
      <TRNUID>1001</TRNUID>
      <STATUS>
        <CODE>0</CODE>
        <SEVERITY>INFO</SEVERITY>
      </STATUS>
      <STMTRS>
        <CURDEF>USD</CURDEF>
        <BANKACCTFROM>
          <BANKID>123456789</BANKID>
          <ACCTID>987654321</ACCTID>
          <ACCTTYPE>CHECKING</ACCTTYPE>
        </BANKACCTFROM>
        <BANKTRANLIST>
          <DTSTART>20231001</DTSTART>
          <DTEND>20231024</DTEND>
          <STMTTRN>
            <TRNTYPE>DEBIT</TRNTYPE>
            <DTPOSTED>20231015</DTPOSTED>
            <TRNAMT>-45.00</TRNAMT>
            <FITID>2023101501</FITID>
            <NAME>Grocery Store</NAME>
          </STMTTRN>
        </BANKTRANLIST>
        <LEDGERBAL>
          <BALAMT>1500.00</BALAMT>
          <DTASOF>20231024</DTASOF>
        </LEDGERBAL>
      </STMTRS>
    </STMTTRNRS>
  </BANKMSGSRSV1>
</OFX>

Key elements include: * SIGNONMSGSRSV1: Validates session status, server timestamp, and language. * STMTRS (Statement Response): Groups account metadata, unique institution identifiers (BANKID), and account numbers (ACCTID). * STMTTRN (Statement Transaction): Contains individual transaction attributes, including transaction type (TRNTYPE), posting date (DTPOSTED), monetary amount (TRNAMT), and the unique financial institution transaction identifier (FITID) used to prevent duplicate imports.

Modern Relevance of OFX

While modern fintech ecosystems frequently adopt JSON-based REST APIs and frameworks like the Financial Data Exchange (FDX) or Open Banking standards, OFX remains widely deployed. It serves as a resilient, standardized backbone for desktop accounting software, automated file imports (.ofx and .qfx files), and legacy core banking integrations worldwide.