|
LibOFX
|
An abstraction of a security position held in an account. More...
#include <libofx.h>
Data Fields | |
| char | account_id [OFX_ACCOUNT_ID_LENGTH] |
| struct OfxAccountData * | account_ptr |
| int | account_id_valid |
OFX mandatory <INVPOS> 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. | |
| enum | HeldInAccountType { OFX_HELDINACCT_CASH , OFX_HELDINACCT_MARGIN , OFX_HELDINACCT_SHORT , OFX_HELDINACCT_OTHER } |
| enum | PositionType { OFX_POSITION_SHORT , OFX_POSITION_LONG } |
| 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 |
| enum OfxPositionData::HeldInAccountType | heldinaccount_type |
| int | heldinaccount_type_valid |
| enum OfxPositionData::PositionType | position_type |
| int | position_type_valid |
| double | units |
| int | units_valid |
| double | unit_price |
| int | unit_price_valid |
| double | market_value |
| int | market_value_valid |
| time_t | date_unit_price |
| int | date_unit_price_valid |
OFX optional <INVPOS> elements | |
The OFX spec defines the following elements as optional. The associated variables may contain valid data. Check if the associated *_valid is true before using them. | |
| enum | Inv401kPosnSource { OFX_401K_POSN_SOURCE_PRETAX , OFX_401K_POSN_SOURCE_AFTERTAX , OFX_401K_POSN_SOURCE_MATCH , OFX_401K_POSN_SOURCE_PROFITSHARING , OFX_401K_POSN_SOURCE_ROLLOVER , OFX_401K_POSN_SOURCE_OTHERVEST , OFX_401K_POSN_SOURCE_OTHERNONVEST } |
| char | memo [OFX_MEMO_LENGTH] |
| int | memo_valid |
| enum OfxPositionData::Inv401kPosnSource | inv_401k_source |
| int | inv_401k_source_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 |
| struct OfxSecurityData * | security_data_ptr |
| int | security_data_valid |
An abstraction of a security position held in an account.
The OfxPositionData structure is used to hold the position information inside a OfxPositionContainer class for investment positions.
| char OfxPositionData::account_id[OFX_ACCOUNT_ID_LENGTH] |
| struct OfxAccountData* OfxPositionData::account_ptr |
Pointer to the full account structure, see OfxAccountData
| int OfxPositionData::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 1265 of file libofx.h.
Referenced by OfxPositionContainer::add_attribute().
| char OfxPositionData::currency[OFX_CURRENCY_LENGTH] |
<CURSYM> The currency is a string in ISO-4217 format
Definition at line 1255 of file libofx.h.
Referenced by OfxPositionContainer::add_attribute().
| double OfxPositionData::currency_ratio |
Ratio of <CURDEF> currency to <CURSYM> currency
Definition at line 1259 of file libofx.h.
Referenced by OfxPositionContainer::add_attribute().
| time_t OfxPositionData::date_unit_price |
Date and time of unit price and market value
Definition at line 1228 of file libofx.h.
Referenced by OfxPositionContainer::add_attribute().
| double OfxPositionData::market_value |
Market value of this position
Definition at line 1224 of file libofx.h.
Referenced by OfxPositionContainer::add_attribute().
| char OfxPositionData::memo[OFX_MEMO_LENGTH] |
Position memo
Definition at line 1238 of file libofx.h.
Referenced by OfxPositionContainer::add_attribute().
| struct OfxSecurityData* OfxPositionData::security_data_ptr |
| char OfxPositionData::unique_id[OFX_UNIQUE_ID_LENGTH] |
The id of the security held. Mandatory for investment positions
Definition at line 1190 of file libofx.h.
Referenced by OfxPositionContainer::add_attribute().
| char OfxPositionData::unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH] |
Usially "CUSIP" for FIs in north america
Definition at line 1192 of file libofx.h.
Referenced by OfxPositionContainer::add_attribute().
| double OfxPositionData::unit_price |
Bonds=of par; options=premium per share of underlying stock; all others=price per share
Definition at line 1220 of file libofx.h.
Referenced by OfxPositionContainer::add_attribute().
| double OfxPositionData::units |
Bonds=face value; options=contracts, all others=shares
Definition at line 1216 of file libofx.h.
Referenced by OfxPositionContainer::add_attribute().