OfxSecurityData Struct Reference

An abstraction of a security, such as a stock, mutual fund, etc. More...

## Public Types

enum | SecurityType { OFX_DEBT_SECURITY, OFX_FUND_SECURITY, OFX_OPTION_SECURITY, OFX_STOCK_SECURITY, OFX_OTHER_SECURITY, OFX_DEBT_SECURITY, OFX_FUND_SECURITY, OFX_OPTION_SECURITY, OFX_STOCK_SECURITY, OFX_OTHER_SECURITY }
enum | SecurityType { OFX_DEBT_SECURITY, OFX_FUND_SECURITY, OFX_OPTION_SECURITY, OFX_STOCK_SECURITY, OFX_OTHER_SECURITY, OFX_DEBT_SECURITY, OFX_FUND_SECURITY, OFX_OPTION_SECURITY, OFX_STOCK_SECURITY, OFX_OTHER_SECURITY }

## Data Fields

enum OfxSecurityData::SecurityType | security_type
int | security_type_valid
OFX mandatory <SECINFO> elements
The OFX spec defines the following elements as mandatory. The associated variables should all contain valid data but you should not trust the servers. Check if the associated *_valid is true before using them.
char | unique_id [OFX_UNIQUE_ID_LENGTH]
int | unique_id_valid
char | unique_id_type [OFX_UNIQUE_ID_TYPE_LENGTH]
int | unique_id_type_valid
char | secname [OFX_SECNAME_LENGTH]
int | secname_valid
OFX optional <SECINFO> elements
The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.
char | ticker [OFX_TICKER_LENGTH]
int | ticker_valid
double | unitprice
int | unitprice_valid
char | rating [OFX_SECURITY_RATING_LENGTH]
int | rating_valid
time_t | date_unitprice
int | date_unitprice_valid
char | currency [OFX_CURRENCY_LENGTH]
int | currency_valid
double | currency_ratio
int | currency_ratio_valid
int | amounts_are_foreign_currency
int | amounts_are_foreign_currency_valid
char | memo [OFX_MEMO2_LENGTH]
int | memo_valid
char | fiid [OFX_FIID_LENGTH]
int | fiid_valid
OFX optional <OPTINFO> elements
The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.
char | unique_id2 [OFX_UNIQUE_ID_LENGTH]
int | unique_id2_valid
char | unique_id2_type [OFX_UNIQUE_ID_TYPE_LENGTH]
int | unique_id2_type_valid

## OFX optional elements common to <DEBTINFO>, <OPTINFO>, <0THERINFO>

The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.
enum | AssetClass { OFX_ASSET_CLASS_DOMESTICBOND, OFX_ASSET_CLASS_INTLBOND, OFX_ASSET_CLASS_LARGESTOCK, OFX_ASSET_CLASS_SMALLSTOCK, OFX_ASSET_CLASS_INTLSTOCK, OFX_ASSET_CLASS_MONEYMRKT, OFX_ASSET_CLASS_OTHER, OFX_ASSET_CLASS_DOMESTICBOND, OFX_ASSET_CLASS_INTLBOND, OFX_ASSET_CLASS_LARGESTOCK, OFX_ASSET_CLASS_SMALLSTOCK, OFX_ASSET_CLASS_INTLSTOCK, OFX_ASSET_CLASS_MONEYMRKT, OFX_ASSET_CLASS_OTHER }
enum | AssetClass { OFX_ASSET_CLASS_DOMESTICBOND, OFX_ASSET_CLASS_INTLBOND, OFX_ASSET_CLASS_LARGESTOCK, OFX_ASSET_CLASS_SMALLSTOCK, OFX_ASSET_CLASS_INTLSTOCK, OFX_ASSET_CLASS_MONEYMRKT, OFX_ASSET_CLASS_OTHER, OFX_ASSET_CLASS_DOMESTICBOND, OFX_ASSET_CLASS_INTLBOND, OFX_ASSET_CLASS_LARGESTOCK, OFX_ASSET_CLASS_SMALLSTOCK, OFX_ASSET_CLASS_INTLSTOCK, OFX_ASSET_CLASS_MONEYMRKT, OFX_ASSET_CLASS_OTHER }
enum OfxSecurityData::AssetClass | asset_class
int | asset_class_valid
char | fiasset_class [OFX_FIASSET_CLASS_LENGTH]
int | fiasset_class_valid

## OFX non-repeating optional <MFINFO> and <STOCKINFO> elements

The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.
enum | MutalFundType { OFX_MFTYPE_OPENEND, OFX_MFTYPE_CLOSEEND, OFX_MFTYPE_OTHER, OFX_MFTYPE_OPENEND, OFX_MFTYPE_CLOSEEND, OFX_MFTYPE_OTHER }
enum | StockType { OFX_STOCKTYPE_COMMON, OFX_STOCKTYPE_PREFERRED, OFX_STOCKTYPE_CONVERTIBLE, OFX_STOCKTYPE_OTHER, OFX_STOCKTYPE_COMMON, OFX_STOCKTYPE_PREFERRED, OFX_STOCKTYPE_CONVERTIBLE, OFX_STOCKTYPE_OTHER }
enum | MutalFundType { OFX_MFTYPE_OPENEND, OFX_MFTYPE_CLOSEEND, OFX_MFTYPE_OTHER, OFX_MFTYPE_OPENEND, OFX_MFTYPE_CLOSEEND, OFX_MFTYPE_OTHER }
enum | StockType { OFX_STOCKTYPE_COMMON, OFX_STOCKTYPE_PREFERRED, OFX_STOCKTYPE_CONVERTIBLE, OFX_STOCKTYPE_OTHER, OFX_STOCKTYPE_COMMON, OFX_STOCKTYPE_PREFERRED, OFX_STOCKTYPE_CONVERTIBLE, OFX_STOCKTYPE_OTHER }
enum OfxSecurityData::MutalFundType | mutual_fund_type
int | mutual_fund_type_valid
enum OfxSecurityData::StockType | stock_type
int | stock_type_valid
double | yield
int | yield_valid
time_t | yield_asof_date
int | yield_asof_date_valid

## OFX mandatory <DEBTINFO> elements

The OFX spec defines the following elements as mandatory. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.
enum | DebtType { OFX_DEBT_TYPE_COUPON, OFX_DEBT_TYPE_ZERO, OFX_DEBT_TYPE_COUPON, OFX_DEBT_TYPE_ZERO }
enum | DebtType { OFX_DEBT_TYPE_COUPON, OFX_DEBT_TYPE_ZERO, OFX_DEBT_TYPE_COUPON, OFX_DEBT_TYPE_ZERO }
double | par_value
int | par_value_valid
enum OfxSecurityData::DebtType | debt_type
int | debt_type_valid

## OFX optional <DEBTINFO> elements

The OFX spec defines the following elements as optional. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.
enum | DebtClass { OFX_DEBTCLASS_TREASURY, OFX_DEBTCLASS_MUNICIPAL, OFX_DEBTCLASS_CORPORATE, OFX_DEBTCLASS_OTHER, OFX_DEBTCLASS_TREASURY, OFX_DEBTCLASS_MUNICIPAL, OFX_DEBTCLASS_CORPORATE, OFX_DEBTCLASS_OTHER }
enum | CouponFreq { OFX_COUPON_FREQ_MONTHLY, OFX_COUPON_FREQ_QUARTERLY, OFX_COUPON_FREQ_SEMIANNUAL, OFX_COUPON_FREQ_ANNUAL, OFX_COUPON_FREQ_OTHER, OFX_COUPON_FREQ_MONTHLY, OFX_COUPON_FREQ_QUARTERLY, OFX_COUPON_FREQ_SEMIANNUAL, OFX_COUPON_FREQ_ANNUAL, OFX_COUPON_FREQ_OTHER }
enum | CallType { OFX_CALL_TYPE_CALL, OFX_CALL_TYPE_PUT, OFX_CALL_TYPE_PREFUND, OFX_CALL_TYPE_MATURITY, OFX_CALL_TYPE_CALL, OFX_CALL_TYPE_PUT, OFX_CALL_TYPE_PREFUND, OFX_CALL_TYPE_MATURITY }
enum | DebtClass { OFX_DEBTCLASS_TREASURY, OFX_DEBTCLASS_MUNICIPAL, OFX_DEBTCLASS_CORPORATE, OFX_DEBTCLASS_OTHER, OFX_DEBTCLASS_TREASURY, OFX_DEBTCLASS_MUNICIPAL, OFX_DEBTCLASS_CORPORATE, OFX_DEBTCLASS_OTHER }
enum | CouponFreq { OFX_COUPON_FREQ_MONTHLY, OFX_COUPON_FREQ_QUARTERLY, OFX_COUPON_FREQ_SEMIANNUAL, OFX_COUPON_FREQ_ANNUAL, OFX_COUPON_FREQ_OTHER, OFX_COUPON_FREQ_MONTHLY, OFX_COUPON_FREQ_QUARTERLY, OFX_COUPON_FREQ_SEMIANNUAL, OFX_COUPON_FREQ_ANNUAL, OFX_COUPON_FREQ_OTHER }
enum | CallType { OFX_CALL_TYPE_CALL, OFX_CALL_TYPE_PUT, OFX_CALL_TYPE_PREFUND, OFX_CALL_TYPE_MATURITY, OFX_CALL_TYPE_CALL, OFX_CALL_TYPE_PUT, OFX_CALL_TYPE_PREFUND, OFX_CALL_TYPE_MATURITY }
enum OfxSecurityData::DebtClass | debt_class
int | debt_class_valid
double | coupon_rate
int | coupon_rate_valid
time_t | date_coupon
int | date_coupon_valid
enum OfxSecurityData::CouponFreq | coupon_freq
int | coupon_freq_valid
double | call_price
int | call_price_valid
double | yield_to_call
int | yield_to_call_valid
time_t | call_date
int | call_date_valid
enum OfxSecurityData::CallType | call_type
int | call_type_valid
double | yield_to_maturity
int | yield_to_maturity_valid
time_t | maturity_date
int | maturity_date_valid

## OFX mandatory <OPTINFO> elements

The OFX spec defines the following elements as mandatory. If the associated *_valid is true, the corresponding element is present and the associated variable contains valid data.
enum | OptionType { OFX_OPTION_TYPE_CALL, OFX_OPTION_TYPE_PUT, OFX_OPTION_TYPE_CALL, OFX_OPTION_TYPE_PUT }
enum | OptionType { OFX_OPTION_TYPE_CALL, OFX_OPTION_TYPE_PUT, OFX_OPTION_TYPE_CALL, OFX_OPTION_TYPE_PUT }
enum OfxSecurityData::OptionType | option_type
int | option_type_valid
double | strike_price
int | strike_price_valid
time_t | date_expire
int | date_expire_valid
double | shares_per_cont
int | shares_per_cont_valid

## Detailed Description

An abstraction of a security, such as a stock, mutual fund, etc.

The OfxSecurityData stucture is used to hold the security information inside a OfxTransactionData struct for investment transactions.

Definition at line 358 of file inc/libofx.h.

## Member Enumeration Documentation

## AssetClass [1/2]

enum OfxSecurityData::AssetClass

Asset class

Definition at line 436 of file inc/libofx.h.

## AssetClass [2/2]

enum OfxSecurityData::AssetClass

Asset class

Definition at line 436 of file libofx-0.10.0/inc/libofx.h.

## CallType [1/2]

enum OfxSecurityData::CallType

Type of the next call

Definition at line 548 of file libofx-0.10.0/inc/libofx.h.

## CallType [2/2]

enum OfxSecurityData::CallType

Type of the next call

Definition at line 548 of file inc/libofx.h.

## CouponFreq [1/2]

enum OfxSecurityData::CouponFreq

When the coupon matures

Definition at line 525 of file libofx-0.10.0/inc/libofx.h.

## CouponFreq [2/2]

enum OfxSecurityData::CouponFreq

When the coupon matures

Definition at line 525 of file inc/libofx.h.

## DebtClass [1/2]

enum OfxSecurityData::DebtClass

Debt Class

Definition at line 507 of file libofx-0.10.0/inc/libofx.h.

## DebtClass [2/2]

enum OfxSecurityData::DebtClass

Debt Class

Definition at line 507 of file inc/libofx.h.

## DebtType [1/2]

enum OfxSecurityData::DebtType

Type of debt

Definition at line 494 of file inc/libofx.h.

## DebtType [2/2]

enum OfxSecurityData::DebtType

Type of debt

Definition at line 494 of file libofx-0.10.0/inc/libofx.h.

## MutalFundType [1/2]

enum OfxSecurityData::MutalFundType

Type of mutual fund

Definition at line 458 of file inc/libofx.h.

## MutalFundType [2/2]

enum OfxSecurityData::MutalFundType

Type of mutual fund

Definition at line 458 of file libofx-0.10.0/inc/libofx.h.

## OptionType [1/2]

enum OfxSecurityData::OptionType

Type of option

Definition at line 571 of file inc/libofx.h.

## OptionType [2/2]

enum OfxSecurityData::OptionType

Type of option

Definition at line 571 of file libofx-0.10.0/inc/libofx.h.

## SecurityType [1/2]

enum OfxSecurityData::SecurityType

The type of the security, OFX entry will be one of DEBTINFO, MFINFO, OPTINFO, OTHERINFO, STOCKINFO

Enumerator
OFX_DEBT_SECURITY | A <DEBTINFO>
OFX_FUND_SECURITY | A <MFINFO>
OFX_OPTION_SECURITY | A <OPTINFO>
OFX_STOCK_SECURITY | A <STOCKINFO>
OFX_OTHER_SECURITY | A <OTHERINFO>
OFX_DEBT_SECURITY | A <DEBTINFO>
OFX_FUND_SECURITY | A <MFINFO>
OFX_OPTION_SECURITY | A <OPTINFO>
OFX_STOCK_SECURITY | A <STOCKINFO>
OFX_OTHER_SECURITY | A <OTHERINFO>

Definition at line 362 of file inc/libofx.h.

## SecurityType [2/2]

enum OfxSecurityData::SecurityType

The type of the security, OFX entry will be one of DEBTINFO, MFINFO, OPTINFO, OTHERINFO, STOCKINFO

Enumerator
OFX_DEBT_SECURITY | A <DEBTINFO>
OFX_FUND_SECURITY | A <MFINFO>
OFX_OPTION_SECURITY | A <OPTINFO>
OFX_STOCK_SECURITY | A <STOCKINFO>
OFX_OTHER_SECURITY | A <OTHERINFO>
OFX_DEBT_SECURITY | A <DEBTINFO>
OFX_FUND_SECURITY | A <MFINFO>
OFX_OPTION_SECURITY | A <OPTINFO>
OFX_STOCK_SECURITY | A <STOCKINFO>
OFX_OTHER_SECURITY | A <OTHERINFO>

Definition at line 362 of file libofx-0.10.0/inc/libofx.h.

## StockType [1/2]

enum OfxSecurityData::StockType

Type of stock

Definition at line 467 of file inc/libofx.h.

## StockType [2/2]

enum OfxSecurityData::StockType

Type of stock

Definition at line 467 of file libofx-0.10.0/inc/libofx.h.

## Field Documentation

## amounts_are_foreign_currency

int OfxSecurityData::amounts_are_foreign_currency

Whether the amounts have already been converted to the default currency. An <ORIGCURRENCY> sets the flag to true, i.e. the amounts are reported in the foreign currency. A <CURRENCY> element sets the flag to false.

Definition at line 419 of file inc/libofx.h.

## call_date

time_t OfxSecurityData::call_date

Next call date

Definition at line 544 of file inc/libofx.h.

## call_price

double OfxSecurityData::call_price

Unit price if called

Definition at line 536 of file inc/libofx.h.

## coupon_rate

double OfxSecurityData::coupon_rate

Bond coupon rate for the next closest call date

Definition at line 517 of file inc/libofx.h.

## currency

char OfxSecurityData::currency

The currency is a string in ISO-4217 format. It overrides the one defined in the statement for the unit price

Definition at line 409 of file inc/libofx.h.

Referenced by OfxStatementContainer::add_attribute().

## currency_ratio

double OfxSecurityData::currency_ratio

ratio of <CURDEF> currency to <CURSYM> currency

Definition at line 413 of file inc/libofx.h.

## date_coupon

time_t OfxSecurityData::date_coupon

Date of the next coupon

Definition at line 521 of file inc/libofx.h.

## date_expire

time_t OfxSecurityData::date_expire

Option expiration date

Definition at line 583 of file inc/libofx.h.

## date_unitprice

time_t OfxSecurityData::date_unitprice

The date as of which the unit price was valid.

Definition at line 404 of file inc/libofx.h.

## fiasset_class

char OfxSecurityData::fiasset_class

Text string for FI defined assest class

Definition at line 449 of file inc/libofx.h.

## fiid

char OfxSecurityData::fiid

Financial Institution ID number for this security

Definition at line 427 of file inc/libofx.h.

## maturity_date

time_t OfxSecurityData::maturity_date

Date of maturity

Definition at line 562 of file inc/libofx.h.

## memo

char OfxSecurityData::memo

Extra information not included in name

Definition at line 422 of file inc/libofx.h.

## par_value

double OfxSecurityData::par_value

Par value of the debt instrument

Definition at line 490 of file inc/libofx.h.

## rating

char OfxSecurityData::rating

The rating for the security

Definition at line 401 of file inc/libofx.h.

## secname

char OfxSecurityData::secname

The full name of the security

Definition at line 386 of file inc/libofx.h.

## shares_per_cont

double OfxSecurityData::shares_per_cont

Shares per contract

Definition at line 587 of file inc/libofx.h.

## strike_price

double OfxSecurityData::strike_price

Option strike price

Definition at line 579 of file inc/libofx.h.

## ticker

char OfxSecurityData::ticker

The ticker symbol of the security

Definition at line 394 of file inc/libofx.h.

## unique_id

char OfxSecurityData::unique_id

The id of the security being traded.

Definition at line 379 of file inc/libofx.h.

## unique_id2

char OfxSecurityData::unique_id2

The id of the underlying security. has the same <UNIQUEID> tag, give the field a different name

Definition at line 597 of file inc/libofx.h.

## unique_id2_type

char OfxSecurityData::unique_id2_type

The id type of the underlying security. has the same <UNIQUEIDTYPE> tag, give the field a different name

Definition at line 602 of file inc/libofx.h.

## unique_id_type

char OfxSecurityData::unique_id_type

Usially "CUSIP" for FIs in north america

Definition at line 382 of file inc/libofx.h.

## unitprice

double OfxSecurityData::unitprice

The price of each unit of the security, as of date_unitprice

Definition at line 397 of file inc/libofx.h.

## yield

double OfxSecurityData::yield

For <MFINFO>, current yield reported as portion of the fund's assests. For <STOCKINFO>, dividend expressed as a portion of the current stock price.

Definition at line 478 of file inc/libofx.h.

## yield_asof_date

time_t OfxSecurityData::yield_asof_date

The date as of which the yield was valid.

Definition at line 481 of file inc/libofx.h.

## yield_to_call

double OfxSecurityData::yield_to_call

Yield to next call

Definition at line 540 of file inc/libofx.h.

## yield_to_maturity

double OfxSecurityData::yield_to_maturity

Yield to maturity

Definition at line 558 of file inc/libofx.h.

The documentation for this struct was generated from the following file:

- inc/libofx.h