IPWorks OFX 2020 Kotlin Edition

Questions / Feedback?

GetStatement Method

Downloads statement for an investment account.

Syntax

public fun getStatement()

Remarks

This function generates the Signon and Investment Statement request page, submits it to the financial institution via secure HTTPS Post, receives and parses the investment statement.

This allows a customer to receive investment transactions, positions, open orders, balances and list of securities that are typically part of a regular paper statement. By using the transaction IDs supplied by FIs, OFX makes it possible that each transaction is downloaded only once. Calling of this method requires to designate an account for the download and to indicate what type of data should be downloaded.

The following properties should be set when this method is called:

  • FIId (required)
  • FIOrganization (required)
  • FIUrl (required)
  • OFXAppId (required)
  • OFXAppVersion (required)
  • OFXVersion (required if 2.x OFX version is the one supported by your FI)
  • OFXUser (required)
  • OFXPassword (required)
  • BrokerId (required)
  • AccountId (required)
  • IncludeTransactions (required if the user does not want to include bank transactions in the current statement download - True by default)
  • IncludePositions (required if the user does not want to include positions as well in the current statement download - True by default)
  • IncludeOpenOrders (required if the user does not want to include open orders as well in the current statement download - True by default)
  • IncludeBalances (required if the user does not want to include balances as well in the current statement download - True by default)

If the user wants to download investment bank transactions (i.e., IncludeTransactions is set to True), a date range (that the transactions fall within) can be specified by setting the StartDate and EndDate. Otherwise, the server will use default values if no dates are supplied.

The following information is returned in server's response:

Date and time for statement (StatementDate).
Default currency for statement (CurrencyCode).
Account identifier (as entered in the request).
Investment transactions (only within the specified start and end dates) including banking transactions, which are a combination of bank transaction detail records and investment transaction detail records.
Open orders - current open trading orders that a user has at a brokerage.This is stored in OpenOrders.
Positions - positions a user has at a brokerage. Each statement response must contain a complete set of position records, even if no transactions occurred in the requested statement period for a particular holding.This is stored in Positions.
Account balances - current balances typically reported on an FI statement, such as cash balance or buying power. They can also convey other numbers of interest, such as current interest rates.This is stored in Balances.
Available Cash Balance (AvailableCash).
Short Balance (ShortBalance)
Margin Balance (MarginBalance).
Marketing message (MarketingInfo).
List of securities - any security referenced in either transactions, positions, open orders or explicitly requested. This is stored in Securities.

For a full list of all read-only properties that are populated as a result of parsing the statement response, please look at OFXDataFile method remarks.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks OFX 2020 Kotlin Edition - Version 20.0 [Build 7941]