/OFXSharp

.NET Standard library to parse OFX Files into plain C# objects. Includes changes to handle OFX files given by banks which don't strictly adhere to the OFX specification.

Primary LanguageC#

OFXSharp

Contributor Covenant Build+Test codecov Release Nuget

This library is a port from the original OFXParser to .NET Standard.

OFXParser is a library to parse OFX Files into plain C# objects, with some small changed done to handle OFX Files used by Brazilian banks, that don't strict follow the OFX pattern.

If you have any request, please feel free to open an issue or start a discussion.

How to use

OfxDocument ofx = OfxDocumentReader.FromSgmlFile( filePath: @"c:\ofxdoc.ofx" );
OfxStatementResponse statement = ofx.Statements.First();

This will give you an object of type OfxStatementResponse, with the following properties:

public class OfxStatementResponse
{
    public OfxStatus ResponseStatus { get; }

    public String DefaultCurrency { get; }

    public Account AccountFrom { get; }

    public DateTimeOffset TransactionsStart { get; }

    public DateTimeOffset TransactionsEnd   { get; }

    public List<Transaction> Transactions { get; }

    public Balance LedgerBalance { get; }

    public Balance AvailableBalance { get; }
}

Code of conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

Please review the Code of conduct for more details.

Maintainer History

This code has quite a history of forks and multiple mainainters releasing it over time!