1
0
镜像自地址 https://github.com/aclindsa/ofxgo.git 已同步 2025-09-17 13:03:27 -04: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.
这个提交包含在:
2017-03-28 19:42:16 -04:00
父节点 0dc6f0ba8a
当前提交 f51af6dd44
共有 2 个文件被更改,包括 10 次插入6 次删除

查看文件

@@ -52,10 +52,11 @@ func invDownload() {
BrokerId: ofxgo.String(brokerId), BrokerId: ofxgo.String(brokerId),
AcctId: ofxgo.String(acctId), AcctId: ofxgo.String(acctId),
}, },
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)), DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)), // a year ago
DtEnd: ofxgo.Date(time.Now()), DtEnd: ofxgo.Date(time.Now().AddDate(0, 0, -1)), // Some FIs (*cough* Fidelity) return errors if DTEND is the current day
Include: true, Include: true,
IncludeOO: true, IncludeOO: true,
PosDtAsOf: ofxgo.Date(time.Now()),
IncludePos: true, IncludePos: true,
IncludeBalance: true, IncludeBalance: true,
Include401K: true, Include401K: true,

查看文件

@@ -38,12 +38,15 @@ func invTransactions() {
BrokerId: ofxgo.String(brokerId), BrokerId: ofxgo.String(brokerId),
AcctId: ofxgo.String(acctId), AcctId: ofxgo.String(acctId),
}, },
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)), DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)), // a year ago
DtEnd: ofxgo.Date(time.Now()), DtEnd: ofxgo.Date(time.Now().AddDate(0, 0, -1)), // Some FIs (*cough* Fidelity) return errors if DTEND is the current day
Include: true, Include: true,
IncludeOO: true,
PosDtAsOf: ofxgo.Date(time.Now()),
IncludePos: true,
IncludeBalance: true, IncludeBalance: true,
// TODO Include401K: true, Include401K: true,
// TODO Include401KBal: true, Include401KBal: true,
} }
query.Investments = append(query.Investments, &statementRequest) query.Investments = append(query.Investments, &statementRequest)