Topic: Ameritrade Syntax error

I am trying to use OFX with Ameritrade but I get 400 error with "The request sent by the client was syntactically incorrect."

Has anybody been successful connecting to Ameritrade?

URL: https://ofxs.ameritrade.com/cgi-bin/apps/OFX

Request:

OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:NONE
<OFX>
    <SIGNONMSGSRQV1>
        <SONRQ>
            <DTCLIENT>20170116102131
            <USERID>myuserid
            <USERPASS>mypw
            <LANGUAGE>ENG
            <FI>
                <ORG>ameritrade.com
                <FID>5024
            </FI>
            <APPID>QWIN
            <APPVER>2100
        </SONRQ>
    </SIGNONMSGSRQV1>
    <INVSTMTMSGSRQV1>
        <INVSTMTTRNRQ>
            <TRNUID>170116102131000000
            <INVSTMTRQ>
                <INVACCTFROM>
                    <BROKERID>ameritrade.com
                    <ACCTID>myacctnum
                </INVACCTFROM>
                <INCTRAN>
                    <DTSTART>20170101000000</DTSTART>
                    <DTEND>20170131000000</DTEND>
                    <INCLUDE>Y
                </INCTRAN>
                <INCOO>N
                <INCPOS>N
                <INCBAL>Y
            </INVSTMTRQ>
        </INVSTMTTRNRQ>
    </INVSTMTMSGSRQV1>
</OFX>

Re: Ameritrade Syntax error

I am connecting successfully using the same OFX specs you are with one difference. I am using <APPVER>2400.

Nancy

Re: Ameritrade Syntax error

Nancy, thank you, I tried with 2400 but it made no difference.