-
Notifications
You must be signed in to change notification settings - Fork 0
/
OFX_Investment.go
717 lines (630 loc) · 26.1 KB
/
OFX_Investment.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
// Code generated by xgen. DO NOT EDIT.
package gofx
// BuyEnum is The OFX element "BUYENUM" is of type "BuyEnum"
type BuyEnum string
// DurationEnum is The OFX element "DURATIONENUM" is of type "DurationEnum"
type DurationEnum string
// GenericContactInfoType is The OFX element "GENCONTACTINFO" is of type "GenericContactInfoType"
type GenericContactInfoType string
// IncomeEnum is The OFX element "INCOMEENUM" is of type "IncomeEnum"
type IncomeEnum string
// InOutEnum is The OFX element "INOUTENUM" is of type "InOutEnum"
type InOutEnum string
// LoanIdType is The OFX element "LOANID" is of type "LoanIdType"
type LoanIdType string
// NumberPayments is The OFX element "NUMPMTS" is of type "NumberPayments"
type NumberPayments string
// OptionActionEnum is The OFX element "OPTACTIONENUM" is of type "OptionActionEnum"
type OptionActionEnum string
// OptionBuyEnum is The OFX element "OPTBUYENUM" is of type "OptionBuyEnum"
type OptionBuyEnum string
// OptionSellEnum is The OFX element "OPTSELLENUM" is of type "OptionSellEnum"
type OptionSellEnum string
// PositionTypeEnum is The OFX element "POSTYPEENUM" is of type "PositionTypeEnum"
type PositionTypeEnum string
// RelatedEnum is The OFX element "RELATEDENUM" is of type "RelatedEnum"
type RelatedEnum string
// RestrictionEnum is The OFX element "RESTRICTIONENUM" is of type "RestrictionEnum"
type RestrictionEnum string
// SecuredEnum is The OFX element "SECUREDENUM" is of type "SecuredEnum"
type SecuredEnum string
// SellReasonEnum is The OFX element "SELLREASONENUM" is of type "SellReasonEnum"
type SellReasonEnum string
// SellTypeEnum is The OFX element "SELLTYPEENUM" is of type "SellTypeEnum"
type SellTypeEnum string
// SubAccountEnum is The OFX element "SUBACCTENUM" is of type "SubAccountEnum"
type SubAccountEnum string
// UnitTypeEnum is The OFX element "UNITTYPEENUM" is of type "UnitTypeEnum"
type UnitTypeEnum string
// AbstractInvestmentBuyTransaction ...
type AbstractInvestmentBuyTransaction struct {
INVBUY *InvestmentBuy `xml:"INVBUY"`
*AbstractInvestmentTransactionBase
}
// AbstractInvestmentSellTransaction ...
type AbstractInvestmentSellTransaction struct {
INVSELL *InvestmentSell `xml:"INVSELL"`
*AbstractInvestmentTransactionBase
}
// BuyDebt is The OFX element "BUYDEBT" is of type "BuyDebt"
type BuyDebt struct {
ACCRDINT string `xml:"ACCRDINT"`
*AbstractInvestmentBuyTransaction
}
// BuyMutualFund is The OFX element "BUYMF" is of type "BuyMutualFund"
type BuyMutualFund struct {
BUYTYPE string `xml:"BUYTYPE"`
RELFITID string `xml:"RELFITID"`
*AbstractInvestmentBuyTransaction
}
// BuyOption is The OFX element "BUYOPT" is of type "BuyOption"
type BuyOption struct {
OPTBUYTYPE string `xml:"OPTBUYTYPE"`
SHPERCTRCT string `xml:"SHPERCTRCT"`
*AbstractInvestmentBuyTransaction
}
// BuyOther is The OFX element "BUYOTHER" is of type "BuyOther"
type BuyOther struct {
*AbstractInvestmentBuyTransaction
}
// BuyStock is The OFX element "BUYSTOCK" is of type "BuyStock"
type BuyStock struct {
BUYTYPE string `xml:"BUYTYPE"`
*AbstractInvestmentBuyTransaction
}
// ClosureOption is The OFX element "CLOSUREOPT" is of type "ClosureOption"
type ClosureOption struct {
SECID *SecurityId `xml:"SECID"`
OPTACTION string `xml:"OPTACTION"`
UNITS string `xml:"UNITS"`
SHPERCTRCT string `xml:"SHPERCTRCT"`
SUBACCTSEC string `xml:"SUBACCTSEC"`
RELFITID string `xml:"RELFITID"`
GAIN string `xml:"GAIN"`
*AbstractInvestmentTransaction
}
// ContributionInfo is The OFX element "CONTRIBINFO" is of type "ContributionInfo"
type ContributionInfo struct {
CONTRIBSECURITY []*ContributionSecurity `xml:"CONTRIBSECURITY"`
}
// ContributionSecurity is The OFX element "CONTRIBSECURITY" is of type "ContributionSecurity"
type ContributionSecurity struct {
SECID *SecurityId `xml:"SECID"`
PRETAXCONTRIBPCT []string `xml:"PRETAXCONTRIBPCT"`
AFTERTAXCONTRIBPCT []string `xml:"AFTERTAXCONTRIBPCT"`
MATCHCONTRIBPCT []string `xml:"MATCHCONTRIBPCT"`
PROFITSHARINGCONTRIBPCT []string `xml:"PROFITSHARINGCONTRIBPCT"`
ROLLOVERCONTRIBPCT []string `xml:"ROLLOVERCONTRIBPCT"`
OTHERVESTPCT []string `xml:"OTHERVESTPCT"`
OTHERNONVESTPCT []string `xml:"OTHERNONVESTPCT"`
PRETAXCONTRIBAMT []string `xml:"PRETAXCONTRIBAMT"`
AFTERTAXCONTRIBAMT []string `xml:"AFTERTAXCONTRIBAMT"`
MATCHCONTRIBAMT []string `xml:"MATCHCONTRIBAMT"`
PROFITSHARINGCONTRIBAMT []string `xml:"PROFITSHARINGCONTRIBAMT"`
ROLLOVERCONTRIBAMT []string `xml:"ROLLOVERCONTRIBAMT"`
OTHERVESTAMT []string `xml:"OTHERVESTAMT"`
OTHERNONVESTAMT []string `xml:"OTHERNONVESTAMT"`
}
// Contributions is The OFX element "CONTRIBUTIONS" is of type "Contributions"
type Contributions struct {
PRETAX string `xml:"PRETAX"`
AFTERTAX string `xml:"AFTERTAX"`
MATCH string `xml:"MATCH"`
PROFITSHARING string `xml:"PROFITSHARING"`
ROLLOVER string `xml:"ROLLOVER"`
OTHERVEST string `xml:"OTHERVEST"`
OTHERNONVEST string `xml:"OTHERNONVEST"`
TOTAL string `xml:"TOTAL"`
}
// Earnings is The OFX element "EARNINGS" is of type "Earnings"
type Earnings struct {
PRETAX string `xml:"PRETAX"`
AFTERTAX string `xml:"AFTERTAX"`
MATCH string `xml:"MATCH"`
PROFITSHARING string `xml:"PROFITSHARING"`
ROLLOVER string `xml:"ROLLOVER"`
OTHERVEST string `xml:"OTHERVEST"`
OTHERNONVEST string `xml:"OTHERNONVEST"`
TOTAL string `xml:"TOTAL"`
}
// InceptToDate is The OFX element "INCEPTTODATE" is of type "InceptToDate"
type InceptToDate struct {
DTSTART string `xml:"DTSTART"`
DTEND string `xml:"DTEND"`
CONTRIBUTIONS *Contributions `xml:"CONTRIBUTIONS"`
WITHDRAWALS *Withdrawals `xml:"WITHDRAWALS"`
EARNINGS *Earnings `xml:"EARNINGS"`
}
// Income is The OFX element "INCOME" is of type "Income"
type Income struct {
SECID *SecurityId `xml:"SECID"`
INCOMETYPE string `xml:"INCOMETYPE"`
TOTAL string `xml:"TOTAL"`
SUBACCTSEC string `xml:"SUBACCTSEC"`
SUBACCTFUND string `xml:"SUBACCTFUND"`
TAXEXEMPT string `xml:"TAXEXEMPT"`
WITHHOLDING string `xml:"WITHHOLDING"`
CURRENCY *Currency `xml:"CURRENCY"`
ORIGCURRENCY *Currency `xml:"ORIGCURRENCY"`
INV401KSOURCE string `xml:"INV401KSOURCE"`
*AbstractInvestmentTransaction
}
// IncPosition is The OFX element "INCPOS" is of type "IncPosition"
type IncPosition struct {
DTASOF string `xml:"DTASOF"`
INCLUDE string `xml:"INCLUDE"`
}
// Investment401k is The OFX element "INV401K" is of type "Investment401k"
type Investment401k struct {
EMPLOYERNAME string `xml:"EMPLOYERNAME"`
PLANID string `xml:"PLANID"`
PLANJOINDATE string `xml:"PLANJOINDATE"`
EMPLOYERCONTACTINFO string `xml:"EMPLOYERCONTACTINFO"`
BROKERCONTACTINFO string `xml:"BROKERCONTACTINFO"`
DEFERPCTPRETAX string `xml:"DEFERPCTPRETAX"`
DEFERPCTAFTERTAX string `xml:"DEFERPCTAFTERTAX"`
MATCHINFO *MatchInfo `xml:"MATCHINFO"`
CONTRIBINFO *ContributionInfo `xml:"CONTRIBINFO"`
CURRENTVESTPCT string `xml:"CURRENTVESTPCT"`
VESTINFO []*VestInfo `xml:"VESTINFO"`
LOANINFO []*LoanInfo `xml:"LOANINFO"`
INV401KSUMMARY *Investment401kSummary `xml:"INV401KSUMMARY"`
}
// Investment401kBalance is The OFX element "INV401KBAL" is of type "Investment401kBalance"
type Investment401kBalance struct {
CASHBAL string `xml:"CASHBAL"`
PRETAX string `xml:"PRETAX"`
AFTERTAX string `xml:"AFTERTAX"`
MATCH string `xml:"MATCH"`
PROFITSHARING string `xml:"PROFITSHARING"`
ROLLOVER string `xml:"ROLLOVER"`
OTHERVEST string `xml:"OTHERVEST"`
OTHERNONVEST string `xml:"OTHERNONVEST"`
TOTAL string `xml:"TOTAL"`
BALLIST *BalanceList `xml:"BALLIST"`
}
// Investment401kSummary is The OFX element "INV401KSUMMARY" is of type "Investment401kSummary"
type Investment401kSummary struct {
YEARTODATE *YearToDate `xml:"YEARTODATE"`
INCEPTTODATE *InceptToDate `xml:"INCEPTTODATE"`
PERIODTODATE *PeriodToDate `xml:"PERIODTODATE"`
}
// InvestmentBalance is The OFX element "INVBAL" is of type "InvestmentBalance"
type InvestmentBalance struct {
AVAILCASH string `xml:"AVAILCASH"`
MARGINBALANCE string `xml:"MARGINBALANCE"`
SHORTBALANCE string `xml:"SHORTBALANCE"`
BUYPOWER string `xml:"BUYPOWER"`
BALLIST *BalanceList `xml:"BALLIST"`
}
// InvestmentBankTransaction is The OFX element "INVBANKTRAN" is of type "InvestmentBankTransaction"
type InvestmentBankTransaction struct {
STMTTRN *StatementTransaction `xml:"STMTTRN"`
SUBACCTFUND string `xml:"SUBACCTFUND"`
}
// InvestmentBuy is The OFX element "INVBUY" is of type "InvestmentBuy"
type InvestmentBuy struct {
SECID *SecurityId `xml:"SECID"`
UNITS string `xml:"UNITS"`
UNITPRICE string `xml:"UNITPRICE"`
MARKUP string `xml:"MARKUP"`
COMMISSION string `xml:"COMMISSION"`
TAXES string `xml:"TAXES"`
FEES string `xml:"FEES"`
LOAD string `xml:"LOAD"`
TOTAL string `xml:"TOTAL"`
CURRENCY *Currency `xml:"CURRENCY"`
ORIGCURRENCY *Currency `xml:"ORIGCURRENCY"`
SUBACCTSEC string `xml:"SUBACCTSEC"`
SUBACCTFUND string `xml:"SUBACCTFUND"`
LOANID string `xml:"LOANID"`
LOANPRINCIPAL string `xml:"LOANPRINCIPAL"`
LOANINTEREST string `xml:"LOANINTEREST"`
INV401KSOURCE string `xml:"INV401KSOURCE"`
DTPAYROLL string `xml:"DTPAYROLL"`
PRIORYEARCONTRIB string `xml:"PRIORYEARCONTRIB"`
*AbstractInvestmentTransaction
}
// InvestmentExpense is The OFX element "INVEXPENSE" is of type "InvestmentExpense"
type InvestmentExpense struct {
SECID *SecurityId `xml:"SECID"`
TOTAL string `xml:"TOTAL"`
SUBACCTSEC string `xml:"SUBACCTSEC"`
SUBACCTFUND string `xml:"SUBACCTFUND"`
CURRENCY *Currency `xml:"CURRENCY"`
ORIGCURRENCY *Currency `xml:"ORIGCURRENCY"`
INV401KSOURCE string `xml:"INV401KSOURCE"`
*AbstractInvestmentTransaction
}
// InvestmentOpenOrderList is The OFX element "INVOOLIST" is of type "InvestmentOpenOrderList"
type InvestmentOpenOrderList struct {
OOBUYDEBT []*OpenOrderBuyDebt `xml:"OOBUYDEBT"`
OOBUYMF []*OpenOrderBuyMutualFund `xml:"OOBUYMF"`
OOBUYOPT []*OpenOrderBuyOption `xml:"OOBUYOPT"`
OOBUYOTHER []*OpenOrderBuyOther `xml:"OOBUYOTHER"`
OOBUYSTOCK []*OpenOrderBuyStock `xml:"OOBUYSTOCK"`
OOSELLDEBT []*OpenOrderSellDebt `xml:"OOSELLDEBT"`
OOSELLMF []*OpenOrderSellMutualFund `xml:"OOSELLMF"`
OOSELLOPT []*OpenOrderSellOption `xml:"OOSELLOPT"`
OOSELLOTHER []*OpenOrderSellOther `xml:"OOSELLOTHER"`
OOSELLSTOCK []*OpenOrderSellStock `xml:"OOSELLSTOCK"`
SWITCHMF []*OpenOrderSwitchMutualFund `xml:"SWITCHMF"`
}
// InvestmentPosition is The OFX element "INVPOS" is of type "InvestmentPosition"
type InvestmentPosition struct {
SECID *SecurityId `xml:"SECID"`
HELDINACCT string `xml:"HELDINACCT"`
POSTYPE string `xml:"POSTYPE"`
UNITS string `xml:"UNITS"`
UNITPRICE string `xml:"UNITPRICE"`
MKTVAL string `xml:"MKTVAL"`
AVGCOSTBASIS string `xml:"AVGCOSTBASIS"`
DTPRICEASOF string `xml:"DTPRICEASOF"`
CURRENCY *Currency `xml:"CURRENCY"`
MEMO string `xml:"MEMO"`
INV401KSOURCE string `xml:"INV401KSOURCE"`
}
// InvestmentPositionList is The OFX element "INVPOSLIST" is of type "InvestmentPositionList"
type InvestmentPositionList struct {
POSMF []*PositionMutualFund `xml:"POSMF"`
POSSTOCK []*PositionStock `xml:"POSSTOCK"`
POSDEBT []*PositionDebt `xml:"POSDEBT"`
POSOPT []*PositionOption `xml:"POSOPT"`
POSOTHER []*PositionOther `xml:"POSOTHER"`
}
// InvestmentSell is The OFX element "INVSELL" is of type "InvestmentSell"
type InvestmentSell struct {
SECID *SecurityId `xml:"SECID"`
UNITS string `xml:"UNITS"`
UNITPRICE string `xml:"UNITPRICE"`
MARKDOWN string `xml:"MARKDOWN"`
COMMISSION string `xml:"COMMISSION"`
TAXES string `xml:"TAXES"`
FEES string `xml:"FEES"`
LOAD string `xml:"LOAD"`
WITHHOLDING string `xml:"WITHHOLDING"`
TAXEXEMPT string `xml:"TAXEXEMPT"`
TOTAL string `xml:"TOTAL"`
GAIN string `xml:"GAIN"`
CURRENCY *Currency `xml:"CURRENCY"`
ORIGCURRENCY *Currency `xml:"ORIGCURRENCY"`
SUBACCTSEC string `xml:"SUBACCTSEC"`
SUBACCTFUND string `xml:"SUBACCTFUND"`
LOANID string `xml:"LOANID"`
STATEWITHHOLDING string `xml:"STATEWITHHOLDING"`
PENALTY string `xml:"PENALTY"`
INV401KSOURCE string `xml:"INV401KSOURCE"`
*AbstractInvestmentTransaction
}
// InvestmentTransaction is The OFX element "INVTRAN" is of type "InvestmentTransaction"
type InvestmentTransaction struct {
FITID string `xml:"FITID"`
SRVRTID string `xml:"SRVRTID"`
DTTRADE string `xml:"DTTRADE"`
DTSETTLE string `xml:"DTSETTLE"`
REVERSALFITID string `xml:"REVERSALFITID"`
MEMO string `xml:"MEMO"`
}
// AbstractInvestmentTransactionBase ...
type AbstractInvestmentTransactionBase struct {
}
// AbstractInvestmentTransaction ...
type AbstractInvestmentTransaction struct {
INVTRAN *InvestmentTransaction `xml:"INVTRAN"`
*AbstractInvestmentTransactionBase
}
// InvestmentTransactionList is The OFX element "INVTRANLIST" is of type "InvestmentTransactionList"
type InvestmentTransactionList struct {
DTSTART string `xml:"DTSTART"`
DTEND string `xml:"DTEND"`
BUYDEBT []*BuyDebt `xml:"BUYDEBT"`
BUYMF []*BuyMutualFund `xml:"BUYMF"`
BUYOPT []*BuyOption `xml:"BUYOPT"`
BUYOTHER []*BuyOther `xml:"BUYOTHER"`
BUYSTOCK []*BuyStock `xml:"BUYSTOCK"`
CLOSUREOPT []*ClosureOption `xml:"CLOSUREOPT"`
INCOME []*Income `xml:"INCOME"`
INVEXPENSE []*InvestmentExpense `xml:"INVEXPENSE"`
JRNLFUND []*JournalFund `xml:"JRNLFUND"`
JRNLSEC []*JournalSecurity `xml:"JRNLSEC"`
MARGININTEREST []*MarginInterest `xml:"MARGININTEREST"`
REINVEST []*Reinvest `xml:"REINVEST"`
RETOFCAP []*ReturnOfCapital `xml:"RETOFCAP"`
SELLDEBT []*SellDebt `xml:"SELLDEBT"`
SELLMF []*SellMutualFund `xml:"SELLMF"`
SELLOPT []*SellOption `xml:"SELLOPT"`
SELLOTHER []*SellOther `xml:"SELLOTHER"`
SELLSTOCK []*SellStock `xml:"SELLSTOCK"`
SPLIT []*Split `xml:"SPLIT"`
TRANSFER []*Transfer `xml:"TRANSFER"`
INVBANKTRAN []*InvestmentBankTransaction `xml:"INVBANKTRAN"`
}
// JournalFund is The OFX element "JRNLFUND" is of type "JournalFund"
type JournalFund struct {
SUBACCTTO string `xml:"SUBACCTTO"`
SUBACCTFROM string `xml:"SUBACCTFROM"`
TOTAL string `xml:"TOTAL"`
*AbstractInvestmentTransaction
}
// JournalSecurity is The OFX element "JRNLSEC" is of type "JournalSecurity"
type JournalSecurity struct {
SECID *SecurityId `xml:"SECID"`
SUBACCTTO string `xml:"SUBACCTTO"`
SUBACCTFROM string `xml:"SUBACCTFROM"`
UNITS string `xml:"UNITS"`
*AbstractInvestmentTransaction
}
// LoanInfo is The OFX element "LOANINFO" is of type "LoanInfo"
type LoanInfo struct {
LOANID string `xml:"LOANID"`
LOANDESC string `xml:"LOANDESC"`
INITIALLOANBAL string `xml:"INITIALLOANBAL"`
LOANSTARTDATE string `xml:"LOANSTARTDATE"`
CURRENTLOANBAL string `xml:"CURRENTLOANBAL"`
DTASOF string `xml:"DTASOF"`
LOANRATE string `xml:"LOANRATE"`
LOANPMTAMT string `xml:"LOANPMTAMT"`
LOANPMTFREQ string `xml:"LOANPMTFREQ"`
LOANPMTSINITIAL string `xml:"LOANPMTSINITIAL"`
LOANPMTSREMAINING string `xml:"LOANPMTSREMAINING"`
LOANMATURITYDATE string `xml:"LOANMATURITYDATE"`
LOANTOTALPROJINTEREST string `xml:"LOANTOTALPROJINTEREST"`
LOANINTERESTTODATE string `xml:"LOANINTERESTTODATE"`
LOANNEXTPMTDATE string `xml:"LOANNEXTPMTDATE"`
}
// MarginInterest is The OFX element "MARGININTEREST" is of type "MarginInterest"
type MarginInterest struct {
TOTAL string `xml:"TOTAL"`
SUBACCTFUND string `xml:"SUBACCTFUND"`
CURRENCY *Currency `xml:"CURRENCY"`
ORIGCURRENCY *Currency `xml:"ORIGCURRENCY"`
*AbstractInvestmentTransaction
}
// MatchInfo is The OFX element "MATCHINFO" is of type "MatchInfo"
type MatchInfo struct {
MATCHPCT string `xml:"MATCHPCT"`
MAXMATCHAMT string `xml:"MAXMATCHAMT"`
MAXMATCHPCT string `xml:"MAXMATCHPCT"`
STARTOFYEAR string `xml:"STARTOFYEAR"`
BASEMATCHAMT string `xml:"BASEMATCHAMT"`
BASEMATCHPCT string `xml:"BASEMATCHPCT"`
}
// AbstractOpenOrder ...
type AbstractOpenOrder struct {
OO *GeneralOpenOrder `xml:"OO"`
}
// GeneralOpenOrder is The OFX element "OO" is of type "GeneralOpenOrder"
type GeneralOpenOrder struct {
FITID string `xml:"FITID"`
SRVRTID string `xml:"SRVRTID"`
SECID *SecurityId `xml:"SECID"`
DTPLACED string `xml:"DTPLACED"`
UNITS string `xml:"UNITS"`
SUBACCT string `xml:"SUBACCT"`
DURATION string `xml:"DURATION"`
RESTRICTION string `xml:"RESTRICTION"`
MINUNITS string `xml:"MINUNITS"`
LIMITPRICE string `xml:"LIMITPRICE"`
STOPPRICE string `xml:"STOPPRICE"`
MEMO string `xml:"MEMO"`
CURRENCY *Currency `xml:"CURRENCY"`
INV401KSOURCE string `xml:"INV401KSOURCE"`
}
// OpenOrderBuyDebt is The OFX element "OOBUYDEBT" is of type "OpenOrderBuyDebt"
type OpenOrderBuyDebt struct {
AUCTION string `xml:"AUCTION"`
DTAUCTION string `xml:"DTAUCTION"`
*AbstractOpenOrder
}
// OpenOrderBuyMutualFund is The OFX element "OOBUYMF" is of type "OpenOrderBuyMutualFund"
type OpenOrderBuyMutualFund struct {
BUYTYPE string `xml:"BUYTYPE"`
UNITTYPE string `xml:"UNITTYPE"`
*AbstractOpenOrder
}
// OpenOrderBuyOption is The OFX element "OOBUYOPT" is of type "OpenOrderBuyOption"
type OpenOrderBuyOption struct {
OPTBUYTYPE string `xml:"OPTBUYTYPE"`
*AbstractOpenOrder
}
// OpenOrderBuyOther is The OFX element "OOBUYOTHER" is of type "OpenOrderBuyOther"
type OpenOrderBuyOther struct {
UNITTYPE string `xml:"UNITTYPE"`
*AbstractOpenOrder
}
// OpenOrderBuyStock is The OFX element "OOBUYSTOCK" is of type "OpenOrderBuyStock"
type OpenOrderBuyStock struct {
BUYTYPE string `xml:"BUYTYPE"`
*AbstractOpenOrder
}
// OpenOrderSellDebt is The OFX element "OOSELLDEBT" is of type "OpenOrderSellDebt"
type OpenOrderSellDebt struct {
*AbstractOpenOrder
}
// OpenOrderSellMutualFund is The OFX element "OOSELLMF" is of type "OpenOrderSellMutualFund"
type OpenOrderSellMutualFund struct {
SELLTYPE string `xml:"SELLTYPE"`
UNITTYPE string `xml:"UNITTYPE"`
SELLALL string `xml:"SELLALL"`
*AbstractOpenOrder
}
// OpenOrderSellOption is The OFX element "OOSELLOPT" is of type "OpenOrderSellOption"
type OpenOrderSellOption struct {
OPTSELLTYPE string `xml:"OPTSELLTYPE"`
*AbstractOpenOrder
}
// OpenOrderSellOther is The OFX element "OOSELLOTHER" is of type "OpenOrderSellOther"
type OpenOrderSellOther struct {
UNITTYPE string `xml:"UNITTYPE"`
*AbstractOpenOrder
}
// OpenOrderSellStock is The OFX element "OOSELLSTOCK" is of type "OpenOrderSellStock"
type OpenOrderSellStock struct {
SELLTYPE string `xml:"SELLTYPE"`
*AbstractOpenOrder
}
// OpenOrderSwitchMutualFund is The OFX element "SWITCHMF" is of type "OpenOrderSwitchMutualFund"
type OpenOrderSwitchMutualFund struct {
SECID *SecurityId `xml:"SECID"`
UNITTYPE string `xml:"UNITTYPE"`
SWITCHALL string `xml:"SWITCHALL"`
*AbstractOpenOrder
}
// PeriodToDate is The OFX element "PERIODTODATE" is of type "PeriodToDate"
type PeriodToDate struct {
DTSTART string `xml:"DTSTART"`
DTEND string `xml:"DTEND"`
CONTRIBUTIONS *Contributions `xml:"CONTRIBUTIONS"`
WITHDRAWALS *Withdrawals `xml:"WITHDRAWALS"`
EARNINGS *Earnings `xml:"EARNINGS"`
}
// PositionDebt is The OFX element "POSDEBT" is of type "PositionDebt"
type PositionDebt struct {
*AbstractPositionBase
}
// AbstractPositionBase ...
type AbstractPositionBase struct {
INVPOS *InvestmentPosition `xml:"INVPOS"`
}
// PositionMutualFund is The OFX element "POSMF" is of type "PositionMutualFund"
type PositionMutualFund struct {
UNITSSTREET string `xml:"UNITSSTREET"`
UNITSUSER string `xml:"UNITSUSER"`
REINVDIV string `xml:"REINVDIV"`
REINVCG string `xml:"REINVCG"`
*AbstractPositionBase
}
// PositionOption is The OFX element "POSOPT" is of type "PositionOption"
type PositionOption struct {
SECURED string `xml:"SECURED"`
*AbstractPositionBase
}
// PositionOther is The OFX element "POSOTHER" is of type "PositionOther"
type PositionOther struct {
*AbstractPositionBase
}
// PositionStock is The OFX element "POSSTOCK" is of type "PositionStock"
type PositionStock struct {
UNITSSTREET string `xml:"UNITSSTREET"`
UNITSUSER string `xml:"UNITSUSER"`
REINVDIV string `xml:"REINVDIV"`
*AbstractPositionBase
}
// Reinvest is The OFX element "REINVEST" is of type "Reinvest"
type Reinvest struct {
SECID *SecurityId `xml:"SECID"`
INCOMETYPE string `xml:"INCOMETYPE"`
TOTAL string `xml:"TOTAL"`
SUBACCTSEC string `xml:"SUBACCTSEC"`
UNITS string `xml:"UNITS"`
UNITPRICE string `xml:"UNITPRICE"`
COMMISSION string `xml:"COMMISSION"`
TAXES string `xml:"TAXES"`
FEES string `xml:"FEES"`
LOAD string `xml:"LOAD"`
TAXEXEMPT string `xml:"TAXEXEMPT"`
CURRENCY *Currency `xml:"CURRENCY"`
ORIGCURRENCY *Currency `xml:"ORIGCURRENCY"`
INV401KSOURCE string `xml:"INV401KSOURCE"`
*AbstractInvestmentTransaction
}
// ReturnOfCapital is The OFX element "RETOFCAP" is of type "ReturnOfCapital"
type ReturnOfCapital struct {
SECID *SecurityId `xml:"SECID"`
TOTAL string `xml:"TOTAL"`
SUBACCTSEC string `xml:"SUBACCTSEC"`
SUBACCTFUND string `xml:"SUBACCTFUND"`
CURRENCY *Currency `xml:"CURRENCY"`
ORIGCURRENCY *Currency `xml:"ORIGCURRENCY"`
INV401KSOURCE string `xml:"INV401KSOURCE"`
*AbstractInvestmentTransaction
}
// SellDebt is The OFX element "SELLDEBT" is of type "SellDebt"
type SellDebt struct {
SELLREASON string `xml:"SELLREASON"`
ACCRDINT string `xml:"ACCRDINT"`
*AbstractInvestmentSellTransaction
}
// SellMutualFund is The OFX element "SELLMF" is of type "SellMutualFund"
type SellMutualFund struct {
SELLTYPE string `xml:"SELLTYPE"`
AVGCOSTBASIS string `xml:"AVGCOSTBASIS"`
RELFITID string `xml:"RELFITID"`
*AbstractInvestmentSellTransaction
}
// SellOption is The OFX element "SELLOPT" is of type "SellOption"
type SellOption struct {
OPTSELLTYPE string `xml:"OPTSELLTYPE"`
SHPERCTRCT string `xml:"SHPERCTRCT"`
RELFITID string `xml:"RELFITID"`
RELTYPE string `xml:"RELTYPE"`
SECURED string `xml:"SECURED"`
*AbstractInvestmentSellTransaction
}
// SellOther is The OFX element "SELLOTHER" is of type "SellOther"
type SellOther struct {
*AbstractInvestmentSellTransaction
}
// SellStock is The OFX element "SELLSTOCK" is of type "SellStock"
type SellStock struct {
SELLTYPE string `xml:"SELLTYPE"`
*AbstractInvestmentSellTransaction
}
// Split is The OFX element "SPLIT" is of type "Split"
type Split struct {
SECID *SecurityId `xml:"SECID"`
SUBACCTSEC string `xml:"SUBACCTSEC"`
OLDUNITS string `xml:"OLDUNITS"`
NEWUNITS string `xml:"NEWUNITS"`
NUMERATOR string `xml:"NUMERATOR"`
DENOMINATOR string `xml:"DENOMINATOR"`
CURRENCY *Currency `xml:"CURRENCY"`
ORIGCURRENCY *Currency `xml:"ORIGCURRENCY"`
FRACCASH string `xml:"FRACCASH"`
SUBACCTFUND string `xml:"SUBACCTFUND"`
INV401KSOURCE string `xml:"INV401KSOURCE"`
*AbstractInvestmentTransaction
}
// Transfer is The OFX element "TRANSFER" is of type "Transfer"
type Transfer struct {
SECID *SecurityId `xml:"SECID"`
SUBACCTSEC string `xml:"SUBACCTSEC"`
UNITS string `xml:"UNITS"`
TFERACTION string `xml:"TFERACTION"`
POSTYPE string `xml:"POSTYPE"`
INVACCTFROM *InvestmentAccount `xml:"INVACCTFROM"`
AVGCOSTBASIS string `xml:"AVGCOSTBASIS"`
UNITPRICE string `xml:"UNITPRICE"`
DTPURCHASE string `xml:"DTPURCHASE"`
INV401KSOURCE string `xml:"INV401KSOURCE"`
*AbstractInvestmentTransaction
}
// VestInfo is The OFX element "VESTINFO" is of type "VestInfo"
type VestInfo struct {
VESTDATE string `xml:"VESTDATE"`
VESTPCT string `xml:"VESTPCT"`
}
// Withdrawals is The OFX element "WITHDRAWALS" is of type "Withdrawals"
type Withdrawals struct {
PRETAX string `xml:"PRETAX"`
AFTERTAX string `xml:"AFTERTAX"`
MATCH string `xml:"MATCH"`
PROFITSHARING string `xml:"PROFITSHARING"`
ROLLOVER string `xml:"ROLLOVER"`
OTHERVEST string `xml:"OTHERVEST"`
OTHERNONVEST string `xml:"OTHERNONVEST"`
TOTAL string `xml:"TOTAL"`
}
// YearToDate is The OFX element "YEARTODATE" is of type "YearToDate"
type YearToDate struct {
DTSTART string `xml:"DTSTART"`
DTEND string `xml:"DTEND"`
CONTRIBUTIONS *Contributions `xml:"CONTRIBUTIONS"`
WITHDRAWALS *Withdrawals `xml:"WITHDRAWALS"`
EARNINGS *Earnings `xml:"EARNINGS"`
}
// InvestmentClosing is The OFX element "INVCLOSING" is of type "InvestmentClosing"
type InvestmentClosing struct {
FITID string `xml:"FITID"`
IMAGEDATA *ImageData `xml:"IMAGEDATA"`
}