diff --git a/response.go b/response.go index a510556..61f471e 100644 --- a/response.go +++ b/response.go @@ -93,8 +93,8 @@ func (or *Response) readSGMLHeaders(r *bufio.Reader) error { return errors.New("OFX VERSION > 160 in SGML header") } case "SECURITY": - if headerValue != "NONE" { - return errors.New("OFX SECURITY header not NONE") + if !(headerValue == "NONE" || headerValue == "TYPE1") { + return errors.New("OFX SECURITY header must be NONE or TYPE1") } case "COMPRESSION": if headerValue != "NONE" { diff --git a/samples/valid_responses/moneymrkt1_v103_TYPE1.ofx b/samples/valid_responses/moneymrkt1_v103_TYPE1.ofx new file mode 100644 index 0000000..4665a4e --- /dev/null +++ b/samples/valid_responses/moneymrkt1_v103_TYPE1.ofx @@ -0,0 +1,75 @@ +OFXHEADER:100 +DATA:OFXSGML +VERSION:103 +SECURITY:TYPE1 +ENCODING:USASCII +CHARSET:1252 +COMPRESSION:NONE +OLDFILEUID:NONE +NEWFILEUID:NONE + + + + +0 +INFO + +20170407001840.607[0:GMT] +ENG + +UJKDO +3534 + + + + + +e1707dfd-695d-4451-8d9c-0e142fdc456a + +0 +INFO + + +USD + +598813374 +35342483513 +MONEYMRKT + + +20170107011841.262[0:GMT] +20170407001841.262[0:GMT] + +CREDIT +20170117120000.000[0:GMT] +-995.4190396554627 +2fb2640c-cee3-4643-8ba3-ea21a4d18954 +Dividend Earned + + +CREDIT +20170215120000.000[0:GMT] +788.5385340523635 +c9d856df-339c-47c6-9f6a-8c2e2910f62e +Dividend Earned + + +CREDIT +20170315120000.000[0:GMT] +3070.1328011762807 +1107ace0-048b-4c0c-b5f3-45b6be4cd71d +Dividend Earned + + + +2607.1664944585727 +20170407001841.262[0:GMT] + + +4503.683156768119 +20170407001841.262[0:GMT] + + + + + \ No newline at end of file