LibOFX: libofx.h Source File

LibOFX

libofx-0.10.8/inc/libofx.h
Go to the documentation of this file.
1 /*-*-c-*-*******************************************************************
2 libofx.h - Main header file for the libofx API
3 -------------------
4 copyright : (C) 2002-2011 by Benoit Grégoire
5 email : benoitg@coeus.ca
6 ***************************************************************************/
26 /***************************************************************************
27 * *
28 * This program is free software; you can redistribute it and/or modify *
29 * it under the terms of the GNU General Public License as published by *
30 * the Free Software Foundation; either version 2 of the License, or *
31 * (at your option) any later version. *
32 * *
33 ***************************************************************************/
34
35 #ifndef LIBOFX_H
36 #define LIBOFX_H
37 #include <time.h>
38
39 #define LIBOFX_MAJOR_VERSION 0
40 #define LIBOFX_MINOR_VERSION 10
41 #define LIBOFX_MICRO_VERSION 8
42 #define LIBOFX_BUILD_VERSION 0
43 #define LIBOFX_VERSION_RELEASE_STRING "0.10.8"
44
45 #ifdef IN_LIBOFX
46 # include "config.h"
47 # ifdef __GNUC__
48 # pragma GCC visibility push(default)
49 # endif
50 #endif
51
52 #ifdef LIBOFX_DLL
53 # ifdef IN_LIBOFX
54 # define LIBOFX_API __declspec(dllexport)
55 # else
56 # define LIBOFX_API __declspec(dllimport)
57 # endif
58 #else
59 #define LIBOFX_API
60 #endif
61
62
63 #ifdef __cplusplus
64 extern "C" {
65 #else
66 #define true 1
67 #define false 0
68 #endif
69
70 #define OFX_ELEMENT_NAME_LENGTH 100
71 #define OFX_SVRTID2_LENGTH (36 + 1)
72 #define OFX_CHECK_NUMBER_LENGTH (12 + 1)
73 #define OFX_REFERENCE_NUMBER_LENGTH (32 + 1)
74 #define OFX_FITID_LENGTH (255 + 1)
75 #define OFX_TOKEN2_LENGTH (36 + 1)
76 #define OFX_MEMO_LENGTH (255 + 1)
77 #define OFX_FIID_LENGTH (32 + 1)
78 #define OFX_MEMO2_LENGTH (390 + 1)
79 #define OFX_BALANCE_NAME_LENGTH (32 + 1)
80 #define OFX_BALANCE_DESCRIPTION_LENGTH (80 + 1)
81 #define OFX_CURRENCY_LENGTH (3 + 1) /* In ISO-4217 format */
82 #define OFX_BANKID_LENGTH (9 + 1)
83 #define OFX_BRANCHID_LENGTH (22 + 1)
84 #define OFX_ACCTID_LENGTH (22 + 1)
85 #define OFX_ACCTKEY_LENGTH (22 + 1)
86 #define OFX_BROKERID_LENGTH (22 + 1)
87 /* Must be MAX of <BANKID>+<BRANCHID>+<ACCTID>, <ACCTID>+<ACCTKEY> and <ACCTID>+<BROKERID> */
88 #define OFX_ACCOUNT_ID_LENGTH (OFX_BANKID_LENGTH + OFX_BRANCHID_LENGTH + OFX_ACCTID_LENGTH + 1)
89 #define OFX_ACCOUNT_NAME_LENGTH 255
90 #define OFX_MARKETING_INFO_LENGTH (360 + 1)
91 #define OFX_TRANSACTION_NAME_LENGTH (96 + 1)
92 #define OFX_UNIQUE_ID_LENGTH (32 + 1)
93 #define OFX_UNIQUE_ID_TYPE_LENGTH (10 + 1)
94 #define OFX_SECNAME_LENGTH (120 + 1)
95 #define OFX_TICKER_LENGTH (32 + 1)
96 #define OFX_ORG_LENGTH (32 + 1)
97 #define OFX_FID_LENGTH (32 + 1)
98 #define OFX_USERID_LENGTH (32 + 1)
99 #define OFX_USERPASS_LENGTH (32 + 1)
100 #define OFX_URL_LENGTH (500 + 1)
101 #define OFX_APPID_LENGTH (32)
102 #define OFX_APPVER_LENGTH (32)
103 #define OFX_HEADERVERSION_LENGTH (32)
104 #define OFX_CLIENTUID_LENGTH (36 + 1)
105 #define OFX_SECURITY_RATING_LENGTH (32 + 1)
106 #define OFX_FIASSET_CLASS_LENGTH (32 + 1)
107 #define OFX_LOANID_LENGTH (32 + 1)
108
109 /*
110 #define OFX_STATEMENT_CB 0;
111 #define OFX_ACCOUNT_CB 1;
112 #define OFX_TRACSACTION_CB 2;
113 #define OFX_SECURITY_CB 3;
114 #define OFX_STATUS_CB 4;
115 */
116
117 typedef void * LibofxContextPtr;
118
124 LibofxContextPtr libofx_get_new_context();
125
131 int libofx_free_context( LibofxContextPtr );
132
133 void libofx_set_dtd_dir(LibofxContextPtr libofx_context,
134 const char *s);
135
137 enum LibofxFileFormat
138 {
139 AUTODETECT,
140 OFX,
141 OFC,
142 QIF,
143 UNKNOWN,
144 LAST
145 };
146
147 struct LibofxFileFormatInfo
148 {
149 enum LibofxFileFormat format;
150 const char * format_name;
151 const char * description;
152 };
153
154
155 #ifndef OFX_AQUAMANIAC_UGLY_HACK1
156
157 const struct LibofxFileFormatInfo LibofxImportFormatList[] =
158 {
159 {AUTODETECT, "AUTODETECT", "AUTODETECT (File format will be automatically detected later)"},
160 {OFX, "OFX", "OFX (Open Financial eXchange (OFX or QFX))"},
161 {OFC, "OFC", "OFC (Microsoft Open Financial Connectivity)"},
162 {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
163 {LAST, "LAST", "Not a file format, meant as a loop breaking condition"}
164 };
165
166 const struct LibofxFileFormatInfo LibofxExportFormatList[] =
167 {
168 {QIF, "QIF", "QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
169 {LAST, "LAST", "Not a file format, meant as a loop breaking condition"}
170 };
171
183 enum LibofxFileFormat libofx_get_file_format_from_str(const struct LibofxFileFormatInfo format_list[], const char * file_type_string);
184
196 const char * libofx_get_file_format_description(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format);
197
198 #endif
199
208 int libofx_proc_file(LibofxContextPtr libofx_context,
209 const char * p_filename,
210 enum LibofxFileFormat ftype);
211
212
225 struct OfxStatusData
226 {
231 char ofx_element_name[OFX_ELEMENT_NAME_LENGTH];
233 int ofx_element_name_valid;
234
239 int code;
240 const char* name;
241 const char* description;
242 int code_valid;
245 enum Severity
246 {
247 INFO,
248 WARN,
249 ERROR
250 } severity;
251 int severity_valid;
252
258 char* server_message;
260 int server_message_valid;
262 };
263
264
274 typedef int (*LibofxProcStatusCallback)(const struct OfxStatusData data, void * status_data);
275
287 struct OfxAccountData
288 {
289
301 char account_id[OFX_ACCOUNT_ID_LENGTH];
302
308 char account_name[OFX_ACCOUNT_NAME_LENGTH];
309 int account_id_valid;/* Use for both account_id and account_name */
310
313 enum AccountType
314 {
315 OFX_CHECKING,
316 OFX_SAVINGS,
317 OFX_MONEYMRKT,
318 OFX_CREDITLINE,
319 OFX_CMA,
320 OFX_CREDITCARD,
321 OFX_INVESTMENT,
322 OFX_401K
323 } account_type;
324 int account_type_valid;
325
327 char currency[OFX_CURRENCY_LENGTH];
328 int currency_valid;
329
331 char account_number[OFX_ACCTID_LENGTH];
332 int account_number_valid;
333
335 char bank_id[OFX_BANKID_LENGTH];
336 int bank_id_valid;
337
338 char broker_id[OFX_BROKERID_LENGTH];
339 int broker_id_valid;
340
341 char branch_id[OFX_BRANCHID_LENGTH];
342 int branch_id_valid;
343
344 };
345
360 typedef int (*LibofxProcAccountCallback)(const struct OfxAccountData data, void * account_data);
361
369 struct OfxSecurityData
370 {
373 enum SecurityType
374 {
375 OFX_DEBT_SECURITY,
376 OFX_FUND_SECURITY,
377 OFX_OPTION_SECURITY,
378 OFX_STOCK_SECURITY,
379 OFX_OTHER_SECURITY,
380 } security_type;
381 int security_type_valid;
382
390 char unique_id[OFX_UNIQUE_ID_LENGTH];
391 int unique_id_valid;
392
393 char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];
395 int unique_id_type_valid;
396
397 char secname[OFX_SECNAME_LENGTH];
398 int secname_valid;
399
405 char ticker[OFX_TICKER_LENGTH];
406 int ticker_valid;
407
408 double unitprice;
410 int unitprice_valid;
411
412 char rating[OFX_SECURITY_RATING_LENGTH];
413 int rating_valid;
414
415 time_t date_unitprice;
416 int date_unitprice_valid;
417
420 char currency[OFX_CURRENCY_LENGTH];
421 int currency_valid;
422
424 double currency_ratio;
425 int currency_ratio_valid;
426
430 int amounts_are_foreign_currency;
431 int amounts_are_foreign_currency_valid;
432
433 char memo[OFX_MEMO2_LENGTH];
434 int memo_valid;
435
438 char fiid[OFX_FIID_LENGTH];
439 int fiid_valid;
440
447 enum AssetClass
448 {
449 OFX_ASSET_CLASS_DOMESTICBOND,
450 OFX_ASSET_CLASS_INTLBOND,
451 OFX_ASSET_CLASS_LARGESTOCK,
452 OFX_ASSET_CLASS_SMALLSTOCK,
453 OFX_ASSET_CLASS_INTLSTOCK,
454 OFX_ASSET_CLASS_MONEYMRKT,
455 OFX_ASSET_CLASS_OTHER
456 } asset_class;
457 int asset_class_valid;
458
460 char fiasset_class[OFX_FIASSET_CLASS_LENGTH];
461 int fiasset_class_valid;
462
469 enum MutalFundType
470 {
471 OFX_MFTYPE_OPENEND,
472 OFX_MFTYPE_CLOSEEND,
473 OFX_MFTYPE_OTHER
474 } mutual_fund_type;
475 int mutual_fund_type_valid;
476
478 enum StockType
479 {
480 OFX_STOCKTYPE_COMMON,
481 OFX_STOCKTYPE_PREFERRED,
482 OFX_STOCKTYPE_CONVERTIBLE,
483 OFX_STOCKTYPE_OTHER
484 } stock_type;
485 int stock_type_valid;
486
489 double yield;
490 int yield_valid;
491
492 time_t yield_asof_date;
493 int yield_asof_date_valid;
494
501 double par_value;
502 int par_value_valid;
503
505 enum DebtType
506 {
507 OFX_DEBT_TYPE_COUPON,
508 OFX_DEBT_TYPE_ZERO
509 } debt_type;
510 int debt_type_valid;
511
518 enum DebtClass
519 {
520 OFX_DEBTCLASS_TREASURY,
521 OFX_DEBTCLASS_MUNICIPAL,
522 OFX_DEBTCLASS_CORPORATE,
523 OFX_DEBTCLASS_OTHER
524 } debt_class;
525 int debt_class_valid;
526
528 double coupon_rate;
529 int coupon_rate_valid;
530
532 time_t date_coupon;
533 int date_coupon_valid;
534
536 enum CouponFreq
537 {
538 OFX_COUPON_FREQ_MONTHLY,
539 OFX_COUPON_FREQ_QUARTERLY,
540 OFX_COUPON_FREQ_SEMIANNUAL,
541 OFX_COUPON_FREQ_ANNUAL,
542 OFX_COUPON_FREQ_OTHER
543 } coupon_freq;
544 int coupon_freq_valid;
545
547 double call_price;
548 int call_price_valid;
549
551 double yield_to_call;
552 int yield_to_call_valid;
553
555 time_t call_date;
556 int call_date_valid;
557
559 enum CallType
560 {
561 OFX_CALL_TYPE_CALL,
562 OFX_CALL_TYPE_PUT,
563 OFX_CALL_TYPE_PREFUND,
564 OFX_CALL_TYPE_MATURITY
565 } call_type;
566 int call_type_valid;
567
569 double yield_to_maturity;
570 int yield_to_maturity_valid;
571
573 time_t maturity_date;
574 int maturity_date_valid;
575
582 enum OptionType
583 {
584 OFX_OPTION_TYPE_CALL,
585 OFX_OPTION_TYPE_PUT
586 } option_type;
587 int option_type_valid;
588
590 double strike_price;
591 int strike_price_valid;
592
594 time_t date_expire;
595 int date_expire_valid;
596
598 double shares_per_cont;
599 int shares_per_cont_valid;
600
608 char unique_id2[OFX_UNIQUE_ID_LENGTH];
609 int unique_id2_valid;
610
613 char unique_id2_type[OFX_UNIQUE_ID_TYPE_LENGTH];
614 int unique_id2_type_valid;
615
616 };/* end struct OfxSecurityData */
617
631 typedef int (*LibofxProcSecurityCallback)(const struct OfxSecurityData data, void * security_data);
632
633 typedef enum
634 {
635 OFX_CREDIT,
636 OFX_DEBIT,
637 OFX_INT,
638 OFX_DIV,
639 OFX_FEE,
640 OFX_SRVCHG,
641 OFX_DEP,
642 OFX_ATM,
643 OFX_POS,
644 OFX_XFER,
645 OFX_CHECK,
646 OFX_PAYMENT,
647 OFX_CASH,
648 OFX_DIRECTDEP,
649 OFX_DIRECTDEBIT,
650 OFX_REPEATPMT,
651 OFX_OTHER
652 } TransactionType;
653
654 typedef enum
655 {
656 OFX_BUYDEBT,
657 OFX_BUYMF,
658 OFX_BUYOPT,
659 OFX_BUYOTHER,
660 OFX_BUYSTOCK,
661 OFX_CLOSUREOPT,
662 OFX_INCOME,
663 OFX_INVEXPENSE,
664 OFX_JRNLFUND,
665 OFX_JRNLSEC,
666 OFX_MARGININTEREST,
667 OFX_REINVEST,
668 OFX_RETOFCAP,
669 OFX_SELLDEBT,
670 OFX_SELLMF,
671 OFX_SELLOPT,
672 OFX_SELLOTHER,
673 OFX_SELLSTOCK,
674 OFX_SPLIT,
675 OFX_TRANSFER,
676 OFX_INVBANKTRAN
677 } InvTransactionType;
678
679 typedef enum
680 {
681 DELETE,
683 REPLACE
685 } FiIdCorrectionAction;
686
693 struct OfxTransactionData
694 {
695
701 char account_id[OFX_ACCOUNT_ID_LENGTH];
704 struct OfxAccountData * account_ptr;
706 int account_id_valid;
707
708 TransactionType transactiontype;
709 int transactiontype_valid;
710
714 InvTransactionType invtransactiontype;
715 int invtransactiontype_valid;
716
724 double units;
725 int units_valid;
726
727 double unitprice;
729 int unitprice_valid;
730
731 double amount;
735 int amount_valid;
736
737 char fi_id[OFX_FITID_LENGTH];
740 int fi_id_valid;
741
749 char unique_id[OFX_UNIQUE_ID_LENGTH];
750 int unique_id_valid;
751 char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];
753 int unique_id_type_valid;
754
755 struct OfxSecurityData *security_data_ptr;
756 int security_data_valid;
757
758 time_t date_posted;
763 int date_posted_valid;
764
765 time_t date_initiated;
771 int date_initiated_valid;
772
773 time_t date_funds_available;
776 int date_funds_available_valid;
777
781 char fi_id_corrected[OFX_FITID_LENGTH];
782 int fi_id_corrected_valid;
783
786 FiIdCorrectionAction fi_id_correction_action;
787 int fi_id_correction_action_valid;
788
791 char server_transaction_id[OFX_SVRTID2_LENGTH];
792 int server_transaction_id_valid;
793
797 char check_number[OFX_CHECK_NUMBER_LENGTH];
798 int check_number_valid;
799
802 char reference_number[OFX_REFERENCE_NUMBER_LENGTH];
803 int reference_number_valid;
804
805 long int standard_industrial_code;
807 int standard_industrial_code_valid;
808
809 char payee_id[OFX_SVRTID2_LENGTH];
810 int payee_id_valid;
811
812 char name[OFX_TRANSACTION_NAME_LENGTH];
814 int name_valid;
815
816 char memo[OFX_MEMO2_LENGTH];
817 int memo_valid;
818
819 double commission;
820 int commission_valid;
821
822 double fees;
823 int fees_valid;
824
825 double oldunits;
826 int oldunits_valid;
827
828 double newunits;
829 int newunits_valid;
830
832 double market_value;
833 int market_value_valid;
834
836 char currency[OFX_CURRENCY_LENGTH];
837 int currency_valid;
838
840 double currency_ratio;
841 int currency_ratio_valid;
842
846 int amounts_are_foreign_currency;
847 int amounts_are_foreign_currency_valid;
848
853 double accrued_interest;
854 int accrued_interest_valid;
855
856 double avg_cost_basis;
857 int avg_cost_basis_valid;
858
861 enum BuyType
862 {
863 OFX_BUY_TYPE_BUY,
864 OFX_BUY_TYPE_BUYTOCOVER,
865 OFX_BUY_TYPE_BUYTOOPEN,
866 OFX_BUY_TYPE_BUYTOCLOSE
867 } buy_type;
868 int buy_type_valid;
869
870 double denominator;
871 int denominator_valid;
872
873 time_t date_payroll;
874 int date_payroll_valid;
875
876 time_t date_purchase;
877 int date_purchase_valid;
878
879 double gain;
880 int gain_valid;
881
882 double cash_for_fractional;
883 int cash_for_fractional_valid;
884
886 enum IncomeType
887 {
888 OFX_CGLONG,
889 OFX_CGSHORT,
890 OFX_DIVIDEND,
891 OFX_INTEREST,
892 OFX_MISC
893 } income_type;
894 int income_type_valid;
895
897 enum Inv401kSource
898 {
899 OFX_401K_SOURCE_PRETAX,
900 OFX_401K_SOURCE_AFTERTAX,
901 OFX_401K_SOURCE_MATCH,
902 OFX_401K_SOURCE_PROFITSHARING,
903 OFX_401K_SOURCE_ROLLOVER,
904 OFX_401K_SOURCE_OTHERVEST,
905 OFX_401K_SOURCE_OTHERNONVEST
906 } inv_401k_source;
907 int inv_401k_source_valid;
908
909 double load;
910 int load_valid;
911
912 char loan_id[OFX_LOANID_LENGTH];
913 int loan_id_valid;
914
915 double loan_interest;
916 int loan_interest_valid;
917
918 double loan_principal;
919 int loan_principal_valid;
920
921 double markdown;
922 int markdown_valid;
923
924 double markup;
925 int markup_valid;
926
927 double numerator;
928 int numerator_valid;
929
931 enum OptAction
932 {
933 OFX_OPTACTION_EXERCISE,
934 OFX_OPTACTION_ASSIGN,
935 OFX_OPTACTION_EXPIRE
936 } opt_action;
937 int opt_action_valid;
938
939 double penalty;
940 int penalty_valid;
941
943 enum PosType
944 {
945 OFX_POSTYPE_LONG,
946 OFX_POSTYPE_SHORT
947 } pos_type;
948 int pos_type_valid;
949
951 int prior_year_contrib;
952 int prior_year_contrib_valid;
953
955 char related_fi_tid[OFX_FITID_LENGTH];
956 int related_fi_tid_valid;
957
959 enum RelatedType
960 {
961 OFX_RELTYPE_SPREAD,
962 OFX_RELTYPE_STRADDLE,
963 OFX_RELTYPE_NONE,
964 OFX_RELTYPE_OTHER
965 } related_type;
966 int related_type_valid;
967
969 enum OptionSecured
970 {
971 OFX_SECURED_NAKED,
972 OFX_SECURED_COVERED
973 } option_secured;
974 int option_secured_valid;
975
977 enum SellReason
978 {
979 OFX_SELLREASON_CALL,
980 OFX_SELLREASON_SELL,
981 OFX_SELLREASON_MATURITY
982 } sell_reason;
983 int sell_reason_valid;
984
987 enum SellType
988 {
989 OFX_SELL_TYPE_SELL,
990 OFX_SELL_TYPE_SELLSHORT,
991 OFX_SELL_TYPE_SELLTOOPEN,
992 OFX_SELL_TYPE_SELLTOCLOSE
993 } sell_type;
994 int sell_type_valid;
995
997 double shares_per_cont;
998 int shares_per_cont_valid;
999
1001 double state_withholding;
1002 int state_withholding_valid;
1003
1005 enum SubAcctType
1006 {
1007 OFX_SUBACCT_CASH,
1008 OFX_SUBACCT_MARGIN,
1009 OFX_SUBACCT_SHORT,
1010 OFX_SUBACCT_OTHER
1011 } subacct_from, subacct_funding, subacct_security, subacct_to;
1012 int subacct_from_valid;
1013 int subacct_funding_valid;
1014 int subacct_security_valid;
1015 int subacct_to_valid;
1018 double taxes;
1019 int taxes_valid;
1020
1022 int tax_exempt;
1023 int tax_exempt_valid;
1024
1026 enum TransferAction
1027 {
1028 OFX_TFERACTION_IN,
1029 OFX_TFERACTION_OUT
1030 } transfer_action;
1031 int transfer_action_valid;
1032
1034 enum UnitType
1035 {
1036 OFX_UNITTYPE_SHARES,
1037 OFX_UNITTYPE_CURRENCY
1038 } unit_type;
1039 int unit_type_valid;
1040
1042 double withholding;
1043 int withholding_valid;
1044
1045 /*********** NOT YET COMPLETE!!! *********************/
1046 };
1047
1057 typedef int (*LibofxProcTransactionCallback)(const struct OfxTransactionData data, void * transaction_data);
1058
1068 struct OfxStatementData
1069 {
1070
1080 char currency[OFX_CURRENCY_LENGTH];
1081 int currency_valid;
1082
1083 char account_id[OFX_ACCOUNT_ID_LENGTH];
1085 struct OfxAccountData * account_ptr;
1087 int account_id_valid;
1088
1091 double ledger_balance;
1092 int ledger_balance_valid;
1093
1094 time_t ledger_balance_date;
1095 int ledger_balance_date_valid;
1096
1098 time_t date_asof;
1099 int date_asof_valid;
1100
1106 double available_balance;
1109 int available_balance_valid;
1110
1111 time_t available_balance_date;
1112 int available_balance_date_valid;
1113
1115 double margin_balance;
1116 int margin_balance_valid;
1117
1119 double short_balance;
1120 int short_balance_valid;
1121
1123 double buying_power;
1124 int buying_power_valid;
1125
1130 time_t date_start;
1131 int date_start_valid;
1132
1137 time_t date_end;
1138 int date_end_valid;
1139
1142 char marketing_info[OFX_MARKETING_INFO_LENGTH];
1143 int marketing_info_valid;
1144 };
1145
1153 typedef int (*LibofxProcStatementCallback)(const struct OfxStatementData data, void * statement_data);
1154
1158 struct OfxCurrency
1159 {
1160 char currency[OFX_CURRENCY_LENGTH];
1161 double exchange_rate;
1162 int must_convert;
1163 };
1164
1172 struct OfxPositionData
1173 {
1175 char account_id[OFX_ACCOUNT_ID_LENGTH];
1178 struct OfxAccountData * account_ptr;
1180 int account_id_valid;
1181
1190 char unique_id[OFX_UNIQUE_ID_LENGTH];
1191 int unique_id_valid;
1192 char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];
1194 int unique_id_type_valid;
1195
1198 enum HeldInAccountType
1199 {
1200 OFX_HELDINACCT_CASH,
1201 OFX_HELDINACCT_MARGIN,
1202 OFX_HELDINACCT_SHORT,
1203 OFX_HELDINACCT_OTHER
1204 } heldinaccount_type;
1205 int heldinaccount_type_valid;
1206
1208 enum PositionType
1209 {
1210 OFX_POSITION_SHORT,
1211 OFX_POSITION_LONG
1212 } position_type;
1213 int position_type_valid;
1214
1216 double units;
1217 int units_valid;
1218
1220 double unit_price;
1221 int unit_price_valid;
1222
1224 double market_value;
1225 int market_value_valid;
1226
1228 time_t date_unit_price;
1229 int date_unit_price_valid;
1230
1238 char memo[OFX_MEMO_LENGTH];
1239 int memo_valid;
1240
1242 enum Inv401kPosnSource
1243 {
1244 OFX_401K_POSN_SOURCE_PRETAX,
1245 OFX_401K_POSN_SOURCE_AFTERTAX,
1246 OFX_401K_POSN_SOURCE_MATCH,
1247 OFX_401K_POSN_SOURCE_PROFITSHARING,
1248 OFX_401K_POSN_SOURCE_ROLLOVER,
1249 OFX_401K_POSN_SOURCE_OTHERVEST,
1250 OFX_401K_POSN_SOURCE_OTHERNONVEST
1251 } inv_401k_source;
1252 int inv_401k_source_valid;
1253
1255 char currency[OFX_CURRENCY_LENGTH];
1256 int currency_valid;
1257
1259 double currency_ratio;
1260 int currency_ratio_valid;
1261
1265 int amounts_are_foreign_currency;
1266 int amounts_are_foreign_currency_valid;
1267
1269 struct OfxSecurityData *security_data_ptr;
1270 int security_data_valid;
1271
1272 };
1273
1281 typedef int (*LibofxProcPositionCallback)(const struct OfxPositionData data, void * position_data);
1282
1283
1290 void ofx_set_status_cb(LibofxContextPtr ctx,
1291 LibofxProcStatusCallback cb,
1292 void *user_data);
1293
1300 void ofx_set_account_cb(LibofxContextPtr ctx,
1301 LibofxProcAccountCallback cb,
1302 void *user_data);
1303
1310 void ofx_set_security_cb(LibofxContextPtr ctx,
1311 LibofxProcSecurityCallback cb,
1312 void *user_data);
1313
1320 void ofx_set_transaction_cb(LibofxContextPtr ctx,
1321 LibofxProcTransactionCallback cb,
1322 void *user_data);
1323
1330 void ofx_set_statement_cb(LibofxContextPtr ctx,
1331 LibofxProcStatementCallback cb,
1332 void *user_data);
1333
1340 void ofx_set_position_cb(LibofxContextPtr ctx,
1341 LibofxProcPositionCallback cb,
1342 void *user_data);
1343
1344
1348 /*int libofx_proc_buffer(LibofxContextPtr ctx,
1349 const char *s, unsigned int size);*/
1350
1351
1352 /* **************************************** */
1353
1359
1363 struct OfxFiServiceInfo
1364 {
1365 char fid[OFX_FID_LENGTH];
1366 char org[OFX_ORG_LENGTH];
1367 char url[OFX_URL_LENGTH];
1368 int accountlist;
1369 int statements;
1370 int billpay;
1371 int investments;
1372 };
1373
1383 struct OfxFiLogin
1384 {
1385 char fid[OFX_FID_LENGTH];
1386 char org[OFX_ORG_LENGTH];
1387 char userid[OFX_USERID_LENGTH];
1388 char userpass[OFX_USERPASS_LENGTH];
1389 char header_version[OFX_HEADERVERSION_LENGTH];
1390 char appid[OFX_APPID_LENGTH];
1391 char appver[OFX_APPVER_LENGTH];
1392 char clientuid[OFX_CLIENTUID_LENGTH];
1393 };
1394
1395 #define OFX_AMOUNT_LENGTH (32 + 1)
1396 #define OFX_PAYACCT_LENGTH (32 + 1)
1397 #define OFX_STATE_LENGTH (5 + 1)
1398 #define OFX_POSTALCODE_LENGTH (11 + 1)
1399 #define OFX_NAME_LENGTH (32 + 1)
1400
1401 struct OfxPayment
1402 {
1403 char amount[OFX_AMOUNT_LENGTH];
1404 char account[OFX_PAYACCT_LENGTH];
1405 char datedue[9];
1406 char memo[OFX_MEMO_LENGTH];
1407 };
1408
1409 struct OfxPayee
1410 {
1411 char name[OFX_NAME_LENGTH];
1412 char address1[OFX_NAME_LENGTH];
1413 char city[OFX_NAME_LENGTH];
1414 char state[OFX_STATE_LENGTH];
1415 char postalcode[OFX_POSTALCODE_LENGTH];
1416 char phone[OFX_NAME_LENGTH];
1417 };
1418
1430 char* libofx_request_statement( const struct OfxFiLogin* fi, const struct OfxAccountData* account, time_t date_from );
1431
1442 char* libofx_request_accountinfo( const struct OfxFiLogin* login );
1443
1444 char* libofx_request_payment( const struct OfxFiLogin* login, const struct OfxAccountData* account, const struct OfxPayee* payee, const struct OfxPayment* payment );
1445
1446 char* libofx_request_payment_status( const struct OfxFiLogin* login, const char* transactionid );
1447
1449
1450 extern LIBOFX_API int ofx_PARSER_msg;
1451 extern LIBOFX_API int ofx_DEBUG_msg;
1452 extern LIBOFX_API int ofx_DEBUG1_msg;
1453 extern LIBOFX_API int ofx_DEBUG2_msg;
1454 extern LIBOFX_API int ofx_DEBUG3_msg;
1455 extern LIBOFX_API int ofx_DEBUG4_msg;
1456 extern LIBOFX_API int ofx_DEBUG5_msg;
1457 extern LIBOFX_API int ofx_STATUS_msg;
1458 extern LIBOFX_API int ofx_INFO_msg;
1459 extern LIBOFX_API int ofx_WARNING_msg;
1460 extern LIBOFX_API int ofx_ERROR_msg;
1461 extern LIBOFX_API int ofx_show_position;
1463 #ifdef __cplusplus
1464 } // end of extern "C"
1465 #endif
1466
1467 #if __GNUC__ && defined(IN_LIBOFX)
1468 # pragma GCC visibility pop
1469 #endif
1470
1471 #endif // end of LIBOFX_H
OfxTransactionData::fi_id
char fi_id[OFX_FITID_LENGTH]
Definition: inc/libofx.h:737
OfxTransactionData::gain
double gain
Definition: inc/libofx.h:879
ofx_show_position
LIBOFX_API int ofx_show_position
Definition: messages.cpp:47
OfxAccountData::OFX_CREDITCARD
@ OFX_CREDITCARD
Definition: inc/libofx.h:320
OfxTransactionData::unitprice
double unitprice
Definition: inc/libofx.h:727
OfxPositionData::OFX_HELDINACCT_OTHER
@ OFX_HELDINACCT_OTHER
Definition: inc/libofx.h:1203
OfxTransactionData::markup
double markup
Definition: inc/libofx.h:924
OfxTransactionData::commission
double commission
Definition: inc/libofx.h:819
OfxStatementData::available_balance
double available_balance
Definition: inc/libofx.h:1106
OFX_SELLMF
@ OFX_SELLMF
Definition: libofx-0.10.8/inc/libofx.h:670
OfxSecurityData::DebtType
DebtType
Definition: inc/libofx.h:505
OfxSecurityData
An abstraction of a security, such as a stock, mutual fund, etc.
Definition: inc/libofx.h:369
OfxTransactionData::account_ptr
struct OfxAccountData * account_ptr
Definition: inc/libofx.h:704
OFX_DEP
@ OFX_DEP
Definition: libofx-0.10.8/inc/libofx.h:641
ofx_DEBUG1_msg
LIBOFX_API int ofx_DEBUG1_msg
Definition: messages.cpp:38
OfxPositionData::units
double units
Definition: inc/libofx.h:1216
OfxTransactionData
An abstraction of a transaction in an account.
Definition: inc/libofx.h:693
OfxSecurityData::OFX_OPTION_SECURITY
@ OFX_OPTION_SECURITY
Definition: inc/libofx.h:377
OfxTransactionData::IncomeType
IncomeType
Definition: inc/libofx.h:886
ofx_DEBUG5_msg
LIBOFX_API int ofx_DEBUG5_msg
Definition: messages.cpp:42
LAST
@ LAST
Definition: libofx-0.10.8/inc/libofx.h:144
OfxPositionData::OFX_HELDINACCT_MARGIN
@ OFX_HELDINACCT_MARGIN
Definition: inc/libofx.h:1201
OfxSecurityData::yield
double yield
Definition: inc/libofx.h:489
OfxTransactionData::SellReason
SellReason
Definition: inc/libofx.h:977
OfxSecurityData::CouponFreq
CouponFreq
Definition: inc/libofx.h:536
OfxTransactionData::fees
double fees
Definition: inc/libofx.h:822
OfxSecurityData::unique_id2_type
char unique_id2_type[OFX_UNIQUE_ID_TYPE_LENGTH]
Definition: inc/libofx.h:613
FiIdCorrectionAction
FiIdCorrectionAction
Definition: libofx-0.10.8/inc/libofx.h:679
OfxFiServiceInfo::investments
int investments
Definition: inc/libofx.h:1371
OfxSecurityData::call_price
double call_price
Definition: inc/libofx.h:547
OfxSecurityData::strike_price
double strike_price
Definition: inc/libofx.h:590
OfxStatementData::currency
char currency[OFX_CURRENCY_LENGTH]
Definition: inc/libofx.h:1080
OfxAccountData::account_id
char account_id[OFX_ACCOUNT_ID_LENGTH]
Definition: inc/libofx.h:301
OfxSecurityData::yield_to_maturity
double yield_to_maturity
Definition: inc/libofx.h:569
OfxTransactionData::shares_per_cont
double shares_per_cont
Definition: inc/libofx.h:997
OfxTransactionData::payee_id
char payee_id[OFX_SVRTID2_LENGTH]
Definition: inc/libofx.h:809
ofx_set_account_cb
void ofx_set_account_cb(LibofxContextPtr ctx, LibofxProcAccountCallback cb, void *user_data)
Definition: context.cpp:198
OfxStatementData::date_asof
time_t date_asof
Definition: inc/libofx.h:1098
OfxAccountData
An abstraction of an account.
Definition: inc/libofx.h:287
OFX_INCOME
@ OFX_INCOME
Definition: libofx-0.10.8/inc/libofx.h:662
OfxFiServiceInfo
Information returned by the OFX Partner Server about a financial institution.
Definition: inc/libofx.h:1363
OfxTransactionData::PosType
PosType
Definition: inc/libofx.h:943
ofx_set_security_cb
void ofx_set_security_cb(LibofxContextPtr ctx, LibofxProcSecurityCallback cb, void *user_data)
Definition: context.cpp:207
OfxStatementData::date_end
time_t date_end
Definition: inc/libofx.h:1137
OfxSecurityData::yield_asof_date
time_t yield_asof_date
Definition: inc/libofx.h:492
OfxAccountData::AccountType
AccountType
Definition: inc/libofx.h:313
OfxTransactionData::market_value
double market_value
Definition: inc/libofx.h:832
OfxSecurityData::unique_id
char unique_id[OFX_UNIQUE_ID_LENGTH]
Definition: inc/libofx.h:390
OfxSecurityData::coupon_rate
double coupon_rate
Definition: inc/libofx.h:528
OfxTransactionData::amount
double amount
Definition: inc/libofx.h:731
OfxStatusData::server_message
char * server_message
Definition: inc/libofx.h:258
OfxStatementData::marketing_info
char marketing_info[OFX_MARKETING_INFO_LENGTH]
Definition: inc/libofx.h:1142
OfxTransactionData::state_withholding
double state_withholding
Definition: inc/libofx.h:1001
OfxPayee
Definition: inc/libofx.h:1409
OfxSecurityData::unique_id_type
char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH]
Definition: inc/libofx.h:393
LibofxProcPositionCallback
int(* LibofxProcPositionCallback)(const struct OfxPositionData data, void *position_data)
The callback function for the OfxPositionData structure.
Definition: libofx-0.10.8/inc/libofx.h:1281
OfxSecurityData::StockType
StockType
Definition: inc/libofx.h:478
OfxTransactionData::OFX_INTEREST
@ OFX_INTEREST
Definition: inc/libofx.h:891
ofx_DEBUG3_msg
LIBOFX_API int ofx_DEBUG3_msg
Definition: messages.cpp:40
OfxAccountData::OFX_INVESTMENT
@ OFX_INVESTMENT
Definition: inc/libofx.h:321
OFX_PAYMENT
@ OFX_PAYMENT
Definition: libofx-0.10.8/inc/libofx.h:646
OfxPositionData::market_value
double market_value
Definition: inc/libofx.h:1224
OfxPositionData::currency_ratio
double currency_ratio
Definition: inc/libofx.h:1259
OfxPositionData::PositionType
PositionType
Definition: inc/libofx.h:1208
libofx_free_context
int libofx_free_context(LibofxContextPtr)
Free all resources used by this context.
Definition: context.cpp:170
OfxStatusData
An abstraction of an OFX STATUS element.
Definition: inc/libofx.h:225
OfxPayment
Definition: inc/libofx.h:1401
OFX_BUYDEBT
@ OFX_BUYDEBT
Definition: libofx-0.10.8/inc/libofx.h:656
OfxSecurityData::ticker
char ticker[OFX_TICKER_LENGTH]
Definition: inc/libofx.h:405
OfxStatementData::date_start
time_t date_start
Definition: inc/libofx.h:1130
OfxTransactionData::cash_for_fractional
double cash_for_fractional
Definition: inc/libofx.h:882
OFX_SRVCHG
@ OFX_SRVCHG
Definition: libofx-0.10.8/inc/libofx.h:640
OfxTransactionData::penalty
double penalty
Definition: inc/libofx.h:939
OfxSecurityData::OFX_DEBT_SECURITY
@ OFX_DEBT_SECURITY
Definition: inc/libofx.h:375
OfxTransactionData::OFX_SELLREASON_CALL
@ OFX_SELLREASON_CALL
Definition: inc/libofx.h:979
OfxTransactionData::fi_id_correction_action
FiIdCorrectionAction fi_id_correction_action
Definition: inc/libofx.h:786
OfxTransactionData::server_transaction_id
char server_transaction_id[OFX_SVRTID2_LENGTH]
Definition: inc/libofx.h:791
OfxSecurityData::par_value
double par_value
Definition: inc/libofx.h:501
OFX_SPLIT
@ OFX_SPLIT
Definition: libofx-0.10.8/inc/libofx.h:674
ofx_DEBUG2_msg
LIBOFX_API int ofx_DEBUG2_msg
Definition: messages.cpp:39
OfxAccountData::OFX_SAVINGS
@ OFX_SAVINGS
Definition: inc/libofx.h:316
OfxTransactionData::subacct_to_valid
int subacct_to_valid
Definition: inc/libofx.h:1015
OfxSecurityData::unitprice
double unitprice
Definition: inc/libofx.h:408
OfxTransactionData::prior_year_contrib
int prior_year_contrib
Definition: inc/libofx.h:951
ofx_set_position_cb
void ofx_set_position_cb(LibofxContextPtr ctx, LibofxProcPositionCallback cb, void *user_data)
Definition: context.cpp:233
AUTODETECT
@ AUTODETECT
Definition: libofx-0.10.8/inc/libofx.h:139
OfxTransactionData::name
char name[OFX_TRANSACTION_NAME_LENGTH]
Definition: inc/libofx.h:812
OfxFiServiceInfo::billpay
int billpay
Definition: inc/libofx.h:1370
libofx_request_statement
char * libofx_request_statement(const struct OfxFiLogin *fi, const struct OfxAccountData *account, time_t date_from)
Creates an OFX statement request in string form.
OfxTransactionData::fi_id_corrected
char fi_id_corrected[OFX_FITID_LENGTH]
Definition: inc/libofx.h:781
OfxStatementData
An abstraction of an account statement.
Definition: inc/libofx.h:1068
LibofxProcSecurityCallback
int(* LibofxProcSecurityCallback)(const struct OfxSecurityData data, void *security_data)
The callback function for the OfxSecurityData structure.
Definition: libofx-0.10.8/inc/libofx.h:631
OfxTransactionData::newunits
double newunits
Definition: inc/libofx.h:828
OFX_DIRECTDEP
@ OFX_DIRECTDEP
Definition: libofx-0.10.8/inc/libofx.h:648
OfxPositionData::account_ptr
struct OfxAccountData * account_ptr
Definition: inc/libofx.h:1178
OfxSecurityData::date_expire
time_t date_expire
Definition: inc/libofx.h:594
OfxSecurityData::call_date
time_t call_date
Definition: inc/libofx.h:555
ofx_WARNING_msg
LIBOFX_API int ofx_WARNING_msg
Definition: messages.cpp:45
OfxTransactionData::date_posted
time_t date_posted
Definition: inc/libofx.h:758
ofx_INFO_msg
LIBOFX_API int ofx_INFO_msg
Definition: messages.cpp:44
OfxAccountData::currency
char currency[OFX_CURRENCY_LENGTH]
Definition: inc/libofx.h:327
OfxTransactionData::tax_exempt
int tax_exempt
Definition: inc/libofx.h:1022
OfxFiLogin
Information sufficient to log into an financial institution.
Definition: inc/libofx.h:1383
OfxCurrency
NOT YET SUPPORTED.
Definition: inc/libofx.h:1158
LibofxFileFormat
LibofxFileFormat
Definition: inc/libofx.h:137
OfxStatusData::ERROR
@ ERROR
Definition: inc/libofx.h:249
OfxFiServiceInfo::accountlist
int accountlist
Definition: inc/libofx.h:1368
OfxStatementData::available_balance_date
time_t available_balance_date
Definition: inc/libofx.h:1111
OfxTransactionData::oldunits
double oldunits
Definition: inc/libofx.h:825
OFX_SELLOTHER
@ OFX_SELLOTHER
Definition: libofx-0.10.8/inc/libofx.h:672
OFX_BUYMF
@ OFX_BUYMF
Definition: libofx-0.10.8/inc/libofx.h:657
OfxStatusData::INFO
@ INFO
Definition: inc/libofx.h:247
OFX_SELLOPT
@ OFX_SELLOPT
Definition: libofx-0.10.8/inc/libofx.h:671
ofx_set_statement_cb
void ofx_set_statement_cb(LibofxContextPtr ctx, LibofxProcStatementCallback cb, void *user_data)
Definition: context.cpp:225
OfxSecurityData::fiasset_class
char fiasset_class[OFX_FIASSET_CLASS_LENGTH]
Definition: inc/libofx.h:460
OFX_INT
@ OFX_INT
Definition: libofx-0.10.8/inc/libofx.h:637
OfxStatusData::ofx_element_name_valid
int ofx_element_name_valid
Definition: inc/libofx.h:233
OfxSecurityData::OptionType
OptionType
Definition: inc/libofx.h:582
LibofxProcAccountCallback
int(* LibofxProcAccountCallback)(const struct OfxAccountData data, void *account_data)
The callback function for the OfxAccountData structure.
Definition: libofx-0.10.8/inc/libofx.h:360
OfxStatementData::short_balance
double short_balance
Definition: inc/libofx.h:1119
OfxPositionData::OFX_HELDINACCT_SHORT
@ OFX_HELDINACCT_SHORT
Definition: inc/libofx.h:1202
ofx_DEBUG_msg
LIBOFX_API int ofx_DEBUG_msg
Definition: messages.cpp:37
OfxAccountData::account_number
char account_number[OFX_ACCTID_LENGTH]
Definition: inc/libofx.h:331
OfxTransactionData::currency_ratio
double currency_ratio
Definition: inc/libofx.h:840
OFX_CLOSUREOPT
@ OFX_CLOSUREOPT
Definition: libofx-0.10.8/inc/libofx.h:661
OFX_BUYOPT
@ OFX_BUYOPT
Definition: libofx-0.10.8/inc/libofx.h:658
OfxStatusData::name
const char * name
Definition: inc/libofx.h:240
OFX_SELLSTOCK
@ OFX_SELLSTOCK
Definition: libofx-0.10.8/inc/libofx.h:673
OfxSecurityData::SecurityType
SecurityType
Definition: inc/libofx.h:373
OfxSecurityData::date_unitprice
time_t date_unitprice
Definition: inc/libofx.h:415
OfxCurrency::exchange_rate
double exchange_rate
Definition: inc/libofx.h:1161
OfxPositionData::HeldInAccountType
HeldInAccountType
Definition: inc/libofx.h:1198
OfxStatementData::account_id
char account_id[OFX_ACCOUNT_ID_LENGTH]
Definition: inc/libofx.h:1083
QIF
@ QIF
Definition: libofx-0.10.8/inc/libofx.h:142
OfxTransactionData::numerator
double numerator
Definition: inc/libofx.h:927
OfxAccountData::OFX_401K
@ OFX_401K
Definition: inc/libofx.h:322
OFX_DIV
@ OFX_DIV
Definition: libofx-0.10.8/inc/libofx.h:638
libofx_get_new_context
LibofxContextPtr libofx_get_new_context()
Initialise the library and return a new context.
Definition: context.cpp:165
OfxTransactionData::SellType
SellType
Definition: inc/libofx.h:987
OfxTransactionData::avg_cost_basis
double avg_cost_basis
Definition: inc/libofx.h:856
OFX_REINVEST
@ OFX_REINVEST
Definition: libofx-0.10.8/inc/libofx.h:667
OfxTransactionData::account_id
char account_id[OFX_ACCOUNT_ID_LENGTH]
Definition: inc/libofx.h:701
OfxTransactionData::loan_principal
double loan_principal
Definition: inc/libofx.h:918
OfxSecurityData::AssetClass
AssetClass
Definition: inc/libofx.h:447
OfxStatusData::WARN
@ WARN
Definition: inc/libofx.h:248
libofx_request_accountinfo
char * libofx_request_accountinfo(const struct OfxFiLogin *login)
Creates an OFX account info (list) request in string form.
OfxStatementData::buying_power
double buying_power
Definition: inc/libofx.h:1123
OfxSecurityData::date_coupon
time_t date_coupon
Definition: inc/libofx.h:532
OfxTransactionData::subacct_from_valid
int subacct_from_valid
Definition: inc/libofx.h:1012
OfxAccountData::account_name
char account_name[OFX_ACCOUNT_NAME_LENGTH]
Definition: inc/libofx.h:308
OFX_FEE
@ OFX_FEE
Definition: libofx-0.10.8/inc/libofx.h:639
OfxPositionData::OFX_HELDINACCT_CASH
@ OFX_HELDINACCT_CASH
Definition: inc/libofx.h:1200
OfxPositionData::currency
char currency[OFX_CURRENCY_LENGTH]
Definition: inc/libofx.h:1255
ofx_set_status_cb
void ofx_set_status_cb(LibofxContextPtr ctx, LibofxProcStatusCallback cb, void *user_data)
Definition: context.cpp:190
OfxPositionData::unique_id_type
char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH]
Definition: inc/libofx.h:1192
OFX_REPEATPMT
@ OFX_REPEATPMT
Definition: libofx-0.10.8/inc/libofx.h:650
OfxSecurityData::yield_to_call
double yield_to_call
Definition: inc/libofx.h:551
OFC
@ OFC
Definition: libofx-0.10.8/inc/libofx.h:141
OfxTransactionData::memo
char memo[OFX_MEMO2_LENGTH]
Definition: inc/libofx.h:816
OfxSecurityData::DebtClass
DebtClass
Definition: inc/libofx.h:518
FiIdCorrectionAction
FiIdCorrectionAction
Definition: inc/libofx.h:679
ofx_DEBUG4_msg
LIBOFX_API int ofx_DEBUG4_msg
Definition: messages.cpp:41
DELETE
@ DELETE
Definition: libofx-0.10.8/inc/libofx.h:681
OfxTransactionData::subacct_funding_valid
int subacct_funding_valid
Definition: inc/libofx.h:1013
OFX_CASH
@ OFX_CASH
Definition: libofx-0.10.8/inc/libofx.h:647
OfxTransactionData::OptAction
OptAction
Definition: inc/libofx.h:931
InvTransactionType
InvTransactionType
Definition: inc/libofx.h:654
OFX_ATM
@ OFX_ATM
Definition: libofx-0.10.8/inc/libofx.h:642
OfxTransactionData::denominator
double denominator
Definition: inc/libofx.h:870
OFX_DIRECTDEBIT
@ OFX_DIRECTDEBIT
Definition: libofx-0.10.8/inc/libofx.h:649
OfxSecurityData::unique_id2
char unique_id2[OFX_UNIQUE_ID_LENGTH]
Definition: inc/libofx.h:608
OfxSecurityData::OFX_STOCK_SECURITY
@ OFX_STOCK_SECURITY
Definition: inc/libofx.h:378
OfxTransactionData::withholding
double withholding
Definition: inc/libofx.h:1042
OfxTransactionData::OFX_CGSHORT
@ OFX_CGSHORT
Definition: inc/libofx.h:889
OfxTransactionData::security_data_valid
int security_data_valid
Definition: inc/libofx.h:756
OfxCurrency::currency
char currency[OFX_CURRENCY_LENGTH]
Definition: inc/libofx.h:1160
OfxTransactionData::RelatedType
RelatedType
Definition: inc/libofx.h:959
OfxAccountData::bank_id
char bank_id[OFX_BANKID_LENGTH]
Definition: inc/libofx.h:335
LibofxFileFormatInfo::format
enum LibofxFileFormat format
Definition: inc/libofx.h:149
OFX_INVEXPENSE
@ OFX_INVEXPENSE
Definition: libofx-0.10.8/inc/libofx.h:663
LibofxFileFormatInfo::format_name
const char * format_name
Definition: inc/libofx.h:150
OfxTransactionData::currency
char currency[OFX_CURRENCY_LENGTH]
Definition: inc/libofx.h:836
OFX_CREDIT
@ OFX_CREDIT
Definition: libofx-0.10.8/inc/libofx.h:635
LibofxProcStatementCallback
int(* LibofxProcStatementCallback)(const struct OfxStatementData data, void *statement_data)
The callback function for the OfxStatementData structure.
Definition: libofx-0.10.8/inc/libofx.h:1153
OfxTransactionData::reference_number
char reference_number[OFX_REFERENCE_NUMBER_LENGTH]
Definition: inc/libofx.h:802
OfxTransactionData::unique_id_type
char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH]
Definition: inc/libofx.h:751
TransactionType
TransactionType
Definition: libofx-0.10.8/inc/libofx.h:633
OFX_INVBANKTRAN
@ OFX_INVBANKTRAN
Definition: libofx-0.10.8/inc/libofx.h:676
OFX_DEBIT
@ OFX_DEBIT
Definition: libofx-0.10.8/inc/libofx.h:636
OfxStatementData::account_ptr
struct OfxAccountData * account_ptr
Definition: inc/libofx.h:1085
OfxTransactionData::amounts_are_foreign_currency
int amounts_are_foreign_currency
Definition: inc/libofx.h:846
OfxSecurityData::currency_ratio
double currency_ratio
Definition: inc/libofx.h:424
OfxTransactionData::taxes
double taxes
Definition: inc/libofx.h:1018
OfxTransactionData::OFX_DIVIDEND
@ OFX_DIVIDEND
Definition: inc/libofx.h:890
OfxStatementData::margin_balance
double margin_balance
Definition: inc/libofx.h:1115
OfxTransactionData::SubAcctType
SubAcctType
Definition: inc/libofx.h:1005
OFX_BUYOTHER
@ OFX_BUYOTHER
Definition: libofx-0.10.8/inc/libofx.h:659
OfxTransactionData::OptionSecured
OptionSecured
Definition: inc/libofx.h:969
OfxSecurityData::memo
char memo[OFX_MEMO2_LENGTH]
Definition: inc/libofx.h:433
ofx_set_transaction_cb
void ofx_set_transaction_cb(LibofxContextPtr ctx, LibofxProcTransactionCallback cb, void *user_data)
Definition: context.cpp:216
OfxTransactionData::BuyType
BuyType
Definition: inc/libofx.h:861
OfxTransactionData::OFX_MISC
@ OFX_MISC
Definition: inc/libofx.h:892
OFX_SELLDEBT
@ OFX_SELLDEBT
Definition: libofx-0.10.8/inc/libofx.h:669
OfxTransactionData::subacct_security_valid
int subacct_security_valid
Definition: inc/libofx.h:1014
OFX_RETOFCAP
@ OFX_RETOFCAP
Definition: libofx-0.10.8/inc/libofx.h:668
OfxPositionData::amounts_are_foreign_currency
int amounts_are_foreign_currency
Definition: inc/libofx.h:1265
OfxSecurityData::fiid
char fiid[OFX_FIID_LENGTH]
Definition: inc/libofx.h:438
LibofxProcTransactionCallback
int(* LibofxProcTransactionCallback)(const struct OfxTransactionData data, void *transaction_data)
The callback function for the OfxTransactionData structure.
Definition: libofx-0.10.8/inc/libofx.h:1057
OfxPositionData::account_id
char account_id[OFX_ACCOUNT_ID_LENGTH]
Definition: inc/libofx.h:1175
OfxSecurityData::CallType
CallType
Definition: inc/libofx.h:559
OfxTransactionData::date_initiated
time_t date_initiated
Definition: inc/libofx.h:765
OfxTransactionData::OFX_SELLREASON_SELL
@ OFX_SELLREASON_SELL
Definition: inc/libofx.h:980
OfxSecurityData::secname
char secname[OFX_SECNAME_LENGTH]
Definition: inc/libofx.h:397
OfxTransactionData::standard_industrial_code
long int standard_industrial_code
Definition: inc/libofx.h:805
OfxTransactionData::transactiontype_valid
int transactiontype_valid
Definition: inc/libofx.h:709
OfxPositionData::unit_price
double unit_price
Definition: inc/libofx.h:1220
OfxStatusData::Severity
Severity
Definition: inc/libofx.h:245
libofx_get_file_format_description
const char * libofx_get_file_format_description(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format)
get_file_format_description returns a string description of a LibofxFileType.
Definition: file_preproc.cpp:36
OFX_MARGININTEREST
@ OFX_MARGININTEREST
Definition: libofx-0.10.8/inc/libofx.h:666
OfxSecurityData::shares_per_cont
double shares_per_cont
Definition: inc/libofx.h:598
OfxTransactionData::accrued_interest
double accrued_interest
Definition: inc/libofx.h:853
OfxTransactionData::UnitType
UnitType
Definition: inc/libofx.h:1034
OfxSecurityData::currency
char currency[OFX_CURRENCY_LENGTH]
Definition: inc/libofx.h:420
OfxTransactionData::loan_id
char loan_id[OFX_LOANID_LENGTH]
Definition: inc/libofx.h:912
ofx_ERROR_msg
LIBOFX_API int ofx_ERROR_msg
Definition: messages.cpp:46
OfxAccountData::OFX_MONEYMRKT
@ OFX_MONEYMRKT
Definition: inc/libofx.h:317
OFX_JRNLSEC
@ OFX_JRNLSEC
Definition: libofx-0.10.8/inc/libofx.h:665
OFX_TRANSFER
@ OFX_TRANSFER
Definition: libofx-0.10.8/inc/libofx.h:675
OfxCurrency::must_convert
int must_convert
Definition: inc/libofx.h:1162
OfxTransactionData::TransferAction
TransferAction
Definition: inc/libofx.h:1026
LibofxProcStatusCallback
int(* LibofxProcStatusCallback)(const struct OfxStatusData data, void *status_data)
The callback function for the OfxStatusData structure.
Definition: libofx-0.10.8/inc/libofx.h:274
OFX
@ OFX
Definition: libofx-0.10.8/inc/libofx.h:140
OfxSecurityData::MutalFundType
MutalFundType
Definition: inc/libofx.h:469
OfxTransactionData::OFX_CGLONG
@ OFX_CGLONG
Definition: inc/libofx.h:888
OfxTransactionData::loan_interest
double loan_interest
Definition: inc/libofx.h:915
ofx_PARSER_msg
LIBOFX_API int ofx_PARSER_msg
Definition: messages.cpp:36
OfxTransactionData::load
double load
Definition: inc/libofx.h:909
OfxStatementData::ledger_balance_date
time_t ledger_balance_date
Definition: inc/libofx.h:1094
libofx_proc_file
int libofx_proc_file(LibofxContextPtr libofx_context, const char *p_filename, enum LibofxFileFormat ftype)
libofx_proc_file is the entry point of the library.
Definition: file_preproc.cpp:66
OfxSecurityData::amounts_are_foreign_currency
int amounts_are_foreign_currency
Definition: inc/libofx.h:430
OfxSecurityData::rating
char rating[OFX_SECURITY_RATING_LENGTH]
Definition: inc/libofx.h:412
LibofxFileFormatInfo::description
const char * description
Definition: inc/libofx.h:151
OFX_BUYSTOCK
@ OFX_BUYSTOCK
Definition: libofx-0.10.8/inc/libofx.h:660
OfxTransactionData::check_number
char check_number[OFX_CHECK_NUMBER_LENGTH]
Definition: inc/libofx.h:797
OfxStatusData::description
const char * description
Definition: inc/libofx.h:241
OfxPositionData::security_data_ptr
struct OfxSecurityData * security_data_ptr
Definition: inc/libofx.h:1269
UNKNOWN
@ UNKNOWN
Definition: libofx-0.10.8/inc/libofx.h:143
OfxPositionData::Inv401kPosnSource
Inv401kPosnSource
Definition: inc/libofx.h:1242
OfxPositionData::unique_id
char unique_id[OFX_UNIQUE_ID_LENGTH]
Definition: inc/libofx.h:1190
OfxStatusData::code
int code
Definition: inc/libofx.h:239
LibofxFileFormatInfo
Definition: inc/libofx.h:147
libofx_get_file_format_from_str
enum LibofxFileFormat libofx_get_file_format_from_str(const struct LibofxFileFormatInfo format_list[], const char *file_type_string)
libofx_get_file_type returns a proper enum from a file type string.
Definition: file_preproc.cpp:53
OfxTransactionData::Inv401kSource
Inv401kSource
Definition: inc/libofx.h:897
OFX_CHECK
@ OFX_CHECK
Definition: libofx-0.10.8/inc/libofx.h:645
OfxAccountData::OFX_CHECKING
@ OFX_CHECKING
Definition: inc/libofx.h:315
OfxTransactionData::date_funds_available
time_t date_funds_available
Definition: inc/libofx.h:773
OfxTransactionData::units
double units
Definition: inc/libofx.h:724
OfxStatementData::ledger_balance
double ledger_balance
Definition: inc/libofx.h:1091
OfxPositionData::date_unit_price
time_t date_unit_price
Definition: inc/libofx.h:1228
TransactionType
TransactionType
Definition: inc/libofx.h:633
OfxTransactionData::unique_id
char unique_id[OFX_UNIQUE_ID_LENGTH]
Definition: inc/libofx.h:749
OFX_OTHER
@ OFX_OTHER
Definition: libofx-0.10.8/inc/libofx.h:651
OfxTransactionData::date_payroll
time_t date_payroll
Definition: inc/libofx.h:873
OfxTransactionData::date_purchase
time_t date_purchase
Definition: inc/libofx.h:876
OfxAccountData::OFX_CREDITLINE
@ OFX_CREDITLINE
Definition: inc/libofx.h:318
OfxTransactionData::markdown
double markdown
Definition: inc/libofx.h:921
OfxTransactionData::OFX_SELLREASON_MATURITY
@ OFX_SELLREASON_MATURITY
Definition: inc/libofx.h:981
OfxStatusData::code_valid
int code_valid
Definition: inc/libofx.h:242
OfxSecurityData::OFX_FUND_SECURITY
@ OFX_FUND_SECURITY
Definition: inc/libofx.h:376
OfxAccountData::OFX_CMA
@ OFX_CMA
Definition: inc/libofx.h:319
OfxTransactionData::related_fi_tid
char related_fi_tid[OFX_FITID_LENGTH]
Definition: inc/libofx.h:955
OFX_JRNLFUND
@ OFX_JRNLFUND
Definition: libofx-0.10.8/inc/libofx.h:664
OFX_XFER
@ OFX_XFER
Definition: libofx-0.10.8/inc/libofx.h:644
OfxPositionData::memo
char memo[OFX_MEMO_LENGTH]
Definition: inc/libofx.h:1238
ofx_STATUS_msg
LIBOFX_API int ofx_STATUS_msg
Definition: messages.cpp:43
OfxSecurityData::OFX_OTHER_SECURITY
@ OFX_OTHER_SECURITY
Definition: inc/libofx.h:379
REPLACE
@ REPLACE
Definition: libofx-0.10.8/inc/libofx.h:683
OFX_POS
@ OFX_POS
Definition: libofx-0.10.8/inc/libofx.h:643
OfxPositionData
An abstraction of a security position held in an account.
Definition: inc/libofx.h:1172
InvTransactionType
InvTransactionType
Definition: libofx-0.10.8/inc/libofx.h:654
OfxSecurityData::maturity_date
time_t maturity_date
Definition: inc/libofx.h:573
OfxFiServiceInfo::statements
int statements
Definition: inc/libofx.h:1369