Remove hardcoded override of Flex Web Service request URL
request_statement() was unconditionally overriding the correct REQUEST_URL (https://gdcdyn.interactivebrokers.com/Universal/servlet/ FlexStatementService.SendRequest) with https://ndcdyn.interactivebrokers.com/portal.flexweb/api/v1/flexQuery. That second URL does not exist -- IB responds with a generic HTML "404 Page Not Found" (~11KB). Because the body is HTML rather than the Flex XML error envelope, parse_stmt_response() can't turn it into a StatementError, so no ResponseCodeError is raised and callers loop indefinitely retrying the dead endpoint. The correct gdcdyn/Universal/servlet/FlexStatementService.SendRequest endpoint is still live and returns a proper <ReferenceCode> for valid token/query pairs (verified against a live Flex token). Dropping the override lets `url = url or REQUEST_URL` stand, restoring working downloads. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
L
LAPTOP-G43MA5MO\ekarni committed
4035c1903cacd254911dfbdc804752425ef0d6fa
Parent: df672d2