Swiftpack.co -  openalloc/FINporter as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
An open source data transformation tool for financial data
.package(url: "https://github.com/openalloc/FINporter.git", from: "1.0.9")


A utility for transforming financial data.

Available both as a finport command line executable and as a Swift library to be incorporated in other apps.

Used by investing apps like FlowAllocator, a new rebalancing tool for macOS.


The developers of this project (presently FlowAllocator LLC) are not financial advisers and do not offer tax or investing advice.

Where explicit support is provided for the transformation of data format associated with a service (brokerage, etc.), it is not a recommendation or endorsement of that service.

Software will have defects. Input data can have errors or become outdated. Carefully examine the output from FINporter for accuracy to ensure it is consistent with your investment goals.

For additional disclaiming, read the LICENSE, which is Apache 2.0.

Supported Schema

At present FINporter supports the schemas of the OpenAlloc project, documented at openalloc/AllocData. Applications which support those schemas can make use of FINporter's importers to ingest the specialized formats it supports.

Supported Data Formats

NOTE: support of a data format for a service is not an endorsement or recommendation of that service.

Applications which have integrated FINporter will typically support imports through a menu item or drag-and-drop. The examples below show how the command-line tool, finport, may be used to transform input files to delimited files of standardized schema.

As support for services expands, more examples will be listed below.


To detect a supported schema of a delimited file:

$ finport detect mystery.txt
=> openalloc/account: text/csv

Fido (Fidelity) Positions

To transform the "Portfolio_Positions_Mmm-dd-yyyy.csv" export requires three(3) commands, as there are three outputs: accounts, account holdings, and securities:

$ finport transform Portfolio_Positions_Jun-30-2021.csv --output-schema openalloc/account
$ finport transform Portfolio_Positions_Jun-30-2021.csv --output-schema openalloc/holding
$ finport transform Portfolio_Positions_Jun-30-2021.csv --output-schema openalloc/security

Each command above will produce comma-separated value data in the following schemas, respectively.

Output schemas:

Fido (Fidelity) Purchases

To transform the "Accounts_History.csv" export:

$ finport transform Accounts_History.csv

The command above will produce comma-separated value data in the following schema.

Output schema: openalloc/history

Fido (Fidelity) Sales

To transform the "Realized_Gain_Loss_Account_00000000.csv" export, available in the 'Closed Positions' view of taxable accounts:

$ finport transform Realized_Gain_Loss_Account_00000000.csv

The command above will produce comma-separated value data in the following schema.

Output schema:

AllocSmart (Allocate Smartly) Export

To transform an export from this service:

$ finport transform "Allocate Smartly Model Portfolio.csv"

The command above will produce comma-separated value data in the following schema.

Output schema:

Command Line

FINporter features finport, a powerful command-line tool to detect and transform financial data, such as exports from your brokerage account.

$ swift build
$ .build/debug/finport

OVERVIEW: A utility for transforming financial data.

USAGE: finport <subcommand>

  --version               Show the version.
  -h, --help              Show help information.

  list                    List things available.
  schema                  Describe schema details.
  detect                  Detect schema of file.
  transform               Transform data in file.

  See 'finport help <subcommand>' for detailed help.

If your favorite product (e.g., FlowAllocator) hasn't yet incorporated the latest FINporter library supporting your service, you can still transform exports using finport. See examples above.


Copyright 2021 FlowAllocator LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Contributions are welcome. You are encouraged to submit pull requests to fix bugs, improve documentation, or offer new features.

The pull request need not be a production-ready feature or fix. It can be a draft of proposed changes, or simply a test to show that expected behavior is buggy. Discussion on the pull request can proceed from there.

Contributions should ultimately have adequate test coverage and command-line support. See tests for current importers to see what coverage is expected.


Stars: 0
Last commit: 2 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

Fix for updated Fido Positions format
2 days ago

Now Fido positions has three targets, with Account being the new one. For the first time Account.Title is being populated from this export.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API