LibOFX
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 structure is used to hold the security information inside a OfxTransactionData struct for investment transactions.

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

Member Enumeration Documentation

◆ AssetClass [1/2]

Asset class

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

◆ AssetClass [2/2]

Asset class

Definition at line 447 of file libofx-0.10.8/inc/libofx.h.

◆ CallType [1/2]

Type of the next call

Definition at line 559 of file libofx-0.10.8/inc/libofx.h.

◆ CallType [2/2]

Type of the next call

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

◆ CouponFreq [1/2]

When the coupon matures

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

◆ CouponFreq [2/2]

When the coupon matures

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

◆ DebtClass [1/2]

Debt Class

Definition at line 518 of file libofx-0.10.8/inc/libofx.h.

◆ DebtClass [2/2]

Debt Class

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

◆ DebtType [1/2]

Type of debt

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

◆ DebtType [2/2]

Type of debt

Definition at line 505 of file libofx-0.10.8/inc/libofx.h.

◆ MutalFundType [1/2]

Type of mutual fund

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

◆ MutalFundType [2/2]

Type of mutual fund

Definition at line 469 of file libofx-0.10.8/inc/libofx.h.

◆ OptionType [1/2]

Type of option

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

◆ OptionType [2/2]

Type of option

Definition at line 582 of file libofx-0.10.8/inc/libofx.h.

◆ SecurityType [1/2]

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 373 of file inc/libofx.h.

◆ SecurityType [2/2]

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 373 of file libofx-0.10.8/inc/libofx.h.

◆ StockType [1/2]

Type of stock

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

◆ StockType [2/2]

Type of stock

Definition at line 478 of file libofx-0.10.8/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 430 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

◆ call_date

time_t OfxSecurityData::call_date

Next call date

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

Referenced by OfxSecurityContainer::add_attribute().

◆ call_price

double OfxSecurityData::call_price

Unit price if called

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

Referenced by OfxSecurityContainer::add_attribute().

◆ coupon_rate

double OfxSecurityData::coupon_rate

Bond coupon rate for the next closest call date

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

Referenced by OfxSecurityContainer::add_attribute().

◆ 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 420 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

◆ currency_ratio

double OfxSecurityData::currency_ratio

ratio of <CURDEF> currency to <CURSYM> currency

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

Referenced by OfxSecurityContainer::add_attribute().

◆ date_coupon

time_t OfxSecurityData::date_coupon

Date of the next coupon

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

Referenced by OfxSecurityContainer::add_attribute().

◆ date_expire

time_t OfxSecurityData::date_expire

Option expiration date

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

Referenced by OfxSecurityContainer::add_attribute().

◆ date_unitprice

time_t OfxSecurityData::date_unitprice

The date as of which the unit price was valid.

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

Referenced by OfxSecurityContainer::add_attribute().

◆ fiasset_class

char OfxSecurityData::fiasset_class

Text string for FI defined assest class

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

◆ fiid

char OfxSecurityData::fiid

Financial Institution ID number for this security

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

Referenced by OfxSecurityContainer::add_attribute().

◆ maturity_date

time_t OfxSecurityData::maturity_date

Date of maturity

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

Referenced by OfxSecurityContainer::add_attribute().

◆ memo

char OfxSecurityData::memo

Extra information not included in name

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

Referenced by OfxSecurityContainer::add_attribute().

◆ par_value

double OfxSecurityData::par_value

Par value of the debt instrument

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

Referenced by OfxSecurityContainer::add_attribute().

◆ rating

char OfxSecurityData::rating

The rating for the security

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

Referenced by OfxSecurityContainer::add_attribute().

◆ secname

char OfxSecurityData::secname

The full name of the security

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

Referenced by OfxSecurityContainer::add_attribute().

◆ shares_per_cont

double OfxSecurityData::shares_per_cont

Shares per contract

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

Referenced by OfxSecurityContainer::add_attribute().

◆ strike_price

double OfxSecurityData::strike_price

Option strike price

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

Referenced by OfxSecurityContainer::add_attribute().

◆ ticker

char OfxSecurityData::ticker

The ticker symbol of the security

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

Referenced by OfxSecurityContainer::add_attribute().

◆ unique_id

char OfxSecurityData::unique_id

The id of the security being traded.

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

Referenced by OfxSecurityContainer::add_attribute().

◆ 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 608 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

◆ 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 613 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

◆ unique_id_type

char OfxSecurityData::unique_id_type

Usially "CUSIP" for FIs in north america

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

Referenced by OfxSecurityContainer::add_attribute().

◆ unitprice

double OfxSecurityData::unitprice

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

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

Referenced by OfxSecurityContainer::add_attribute().

◆ 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 489 of file inc/libofx.h.

Referenced by OfxSecurityContainer::add_attribute().

◆ yield_asof_date

time_t OfxSecurityData::yield_asof_date

The date as of which the yield was valid.

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

Referenced by OfxSecurityContainer::add_attribute().

◆ yield_to_call

double OfxSecurityData::yield_to_call

Yield to next call

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

Referenced by OfxSecurityContainer::add_attribute().

◆ yield_to_maturity

double OfxSecurityData::yield_to_maturity

Yield to maturity

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

Referenced by OfxSecurityContainer::add_attribute().


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