mirror of
https://github.com/aclindsa/ofxgo.git
synced 2024-12-25 22:43:21 -05:00
cmd/ofx: Play nice with Fidelity
Fidelity (Netbenefits at least) returns an error of DTEND is the current day, so request 'yesterday' by default.
This commit is contained in:
parent
0dc6f0ba8a
commit
f51af6dd44
@ -52,10 +52,11 @@ func invDownload() {
|
||||
BrokerId: ofxgo.String(brokerId),
|
||||
AcctId: ofxgo.String(acctId),
|
||||
},
|
||||
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)),
|
||||
DtEnd: ofxgo.Date(time.Now()),
|
||||
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)), // a year ago
|
||||
DtEnd: ofxgo.Date(time.Now().AddDate(0, 0, -1)), // Some FIs (*cough* Fidelity) return errors if DTEND is the current day
|
||||
Include: true,
|
||||
IncludeOO: true,
|
||||
PosDtAsOf: ofxgo.Date(time.Now()),
|
||||
IncludePos: true,
|
||||
IncludeBalance: true,
|
||||
Include401K: true,
|
||||
|
@ -38,12 +38,15 @@ func invTransactions() {
|
||||
BrokerId: ofxgo.String(brokerId),
|
||||
AcctId: ofxgo.String(acctId),
|
||||
},
|
||||
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)),
|
||||
DtEnd: ofxgo.Date(time.Now()),
|
||||
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)), // a year ago
|
||||
DtEnd: ofxgo.Date(time.Now().AddDate(0, 0, -1)), // Some FIs (*cough* Fidelity) return errors if DTEND is the current day
|
||||
Include: true,
|
||||
IncludeOO: true,
|
||||
PosDtAsOf: ofxgo.Date(time.Now()),
|
||||
IncludePos: true,
|
||||
IncludeBalance: true,
|
||||
// TODO Include401K: true,
|
||||
// TODO Include401KBal: true,
|
||||
Include401K: true,
|
||||
Include401KBal: true,
|
||||
}
|
||||
query.Investments = append(query.Investments, &statementRequest)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user