PHPackages                             upgestao/ofxparser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. upgestao/ofxparser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

upgestao/ofxparser
==================

Simple OFX file parser

1.2.9(4mo ago)0374MITPHPPHP ~5.6|~7.0

Since Jul 23Pushed 3mo agoCompare

[ Source](https://github.com/upgestao/ofxparser)[ Packagist](https://packagist.org/packages/upgestao/ofxparser)[ RSS](/packages/upgestao-ofxparser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (24)Used By (0)

OFX Parser
==========

[](#ofx-parser)

Este repositório é um fork. Feito para correções pois o repositório principal foi descontinuado. UpGestão
=========================================================================================================

[](#este-repositório-é-um-fork-feito-para-correções-pois-o-repositório-principal-foi-descontinuado-upgestão)

OFX Parser is a PHP library designed to parse an OFX file downloaded from a financial institution into simple PHP objects.

It supports multiple Bank Accounts, the required "Sign On" response, and recognises OFX timestamps.

Installation
------------

[](#installation)

Simply require the package using [Composer](https://getcomposer.org/):

```
$ composer require samueledson/ofxparser
```

Usage
-----

[](#usage)

You can access the nodes in your OFX file as follows:

```
$ofxParser = new \OfxParser\Parser();
$ofx = $ofxParser->loadFromFile('/path/to/your/bankstatement.ofx');

$bankAccount = reset($ofx->bankAccounts);

// Get the statement start and end dates
$startDate = $bankAccount->statement->startDate;
$endDate = $bankAccount->statement->endDate;

// Get the statement transactions for the account
$transactions = $bankAccount->statement->transactions;
```

Most common nodes are support. If you come across an inaccessible node in your OFX file, please submit a pull request!

Investments Support
-------------------

[](#investments-support)

Investments look much different than bank / credit card transactions. This version supports a subset of the nodes in the OFX 2.0.3 spec, per the immediate needs of the author(s). You may want to reference the OFX documentation if you choose to implement this library. In particular, this does not currently process investment positions (INVPOSLIST) or referenced security definitions (SECINFO).

This is not a pure pass-through of fields, such as this implementation in python: [csingley/ofxtools](https://github.com/csingley/ofxtools). This package contains fields that have been "translated" on occasion to make it more friendly to those less-familiar with the investments OFX spec.

To load investments from a Quicken (QFX) file or a MS Money (OFX / XML) file:

```
// You'll probably want to alias the namespace:
use OfxParser\Entities\Investment as InvEntities;

// Load the OFX file
$ofxParser = new \OfxParser\Parsers\Investment();
$ofx = $ofxParser->loadFromFile('/path/to/your/investments_file.ofx');

// Loop over investment accounts (named bankAccounts from base lib)
foreach ($ofx->bankAccounts as $accountData) {
    // Loop over transactions
    foreach ($accountData->statement->transactions as $ofxEntity) {
        // Keep in mind... not all properties are inherited for all transaction types...

        // Maybe you'll want to do something based on the transaction properties:
        $nodeName = $ofxEntity->nodeName;
        if ($nodeName == 'BUYSTOCK') {
            // @see OfxParser\Entities\Investment\Transaction...

            $amount = abs($ofxEntity->total);
            $cusip = $ofxEntity->securityId;

            // ...
        }

        // Maybe you'll want to do something based on the entity:
        if ($ofxEntity instanceof InvEntities\Transaction\BuyStock) {
            // ...
        }

    }
}
```

Fork &amp; Credits
------------------

[](#fork--credits)

This is a fork of [grimfor/ofxparser](https://github.com/Grimfor/ofxparser) made to be framework independent. The source repo was designed for Symfony 2 framework, so credit should be given where credit due! Heavily refactored by [Oliver Lowe](https://github.com/loweoj) and loosely based on the ruby [ofx-parser by Andrew A. Smith](https://github.com/aasmith/ofx-parser).

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance79

Regular maintenance activity

Popularity12

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 51.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~279 days

Recently: every ~230 days

Total

16

Last Release

123d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.4

1.2.0PHP ~5.6|~7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e1ff2f20b008bc26f0568c613a7d7a9bfc46dfc0f576e2584534e765a8b942a?d=identicon)[upgestao](/maintainers/upgestao)

---

Top Contributors

[![asgrim](https://avatars.githubusercontent.com/u/496145?v=4)](https://github.com/asgrim "asgrim (72 commits)")[![loweoj](https://avatars.githubusercontent.com/u/915917?v=4)](https://github.com/loweoj "loweoj (12 commits)")[![guimelaninho](https://avatars.githubusercontent.com/u/21234515?v=4)](https://github.com/guimelaninho "guimelaninho (9 commits)")[![ambroisemaupate](https://avatars.githubusercontent.com/u/380026?v=4)](https://github.com/ambroisemaupate "ambroisemaupate (8 commits)")[![moleculezz](https://avatars.githubusercontent.com/u/118499?v=4)](https://github.com/moleculezz "moleculezz (7 commits)")[![nicolasrabier](https://avatars.githubusercontent.com/u/2274443?v=4)](https://github.com/nicolasrabier "nicolasrabier (4 commits)")[![gitmathias](https://avatars.githubusercontent.com/u/365221?v=4)](https://github.com/gitmathias "gitmathias (4 commits)")[![hucharal](https://avatars.githubusercontent.com/u/6876338?v=4)](https://github.com/hucharal "hucharal (4 commits)")[![diegoricardo](https://avatars.githubusercontent.com/u/2482691?v=4)](https://github.com/diegoricardo "diegoricardo (4 commits)")[![leonardovilela100](https://avatars.githubusercontent.com/u/61808858?v=4)](https://github.com/leonardovilela100 "leonardovilela100 (3 commits)")[![renatomb](https://avatars.githubusercontent.com/u/30217311?v=4)](https://github.com/renatomb "renatomb (2 commits)")[![fernando-nery](https://avatars.githubusercontent.com/u/15134576?v=4)](https://github.com/fernando-nery "fernando-nery (2 commits)")[![gwennael-jean](https://avatars.githubusercontent.com/u/4457236?v=4)](https://github.com/gwennael-jean "gwennael-jean (2 commits)")[![upgestaouser](https://avatars.githubusercontent.com/u/109246811?v=4)](https://github.com/upgestaouser "upgestaouser (2 commits)")[![valorin](https://avatars.githubusercontent.com/u/897369?v=4)](https://github.com/valorin "valorin (1 commits)")[![gammamatrix](https://avatars.githubusercontent.com/u/524724?v=4)](https://github.com/gammamatrix "gammamatrix (1 commits)")[![jacques](https://avatars.githubusercontent.com/u/2543?v=4)](https://github.com/jacques "jacques (1 commits)")[![jpswade](https://avatars.githubusercontent.com/u/1087963?v=4)](https://github.com/jpswade "jpswade (1 commits)")[![oceanapplications](https://avatars.githubusercontent.com/u/2704923?v=4)](https://github.com/oceanapplications "oceanapplications (1 commits)")[![samueledson](https://avatars.githubusercontent.com/u/3043984?v=4)](https://github.com/samueledson "samueledson (1 commits)")

---

Tags

parserfinanceofxopen financial exchange

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/upgestao-ofxparser/health.svg)

```
[![Health](https://phpackages.com/badges/upgestao-ofxparser/health.svg)](https://phpackages.com/packages/upgestao-ofxparser)
```

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[matomo/device-detector

The Universal Device Detection library, that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, media players, mobile apps, feed readers, libraries, etc), operating systems, devices, brands and models.

3.5k23.5M111](/packages/matomo-device-detector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
