#!/usr/bin/env python3 import requests headers = {'Content-Type': 'application/x-ofx'} payload = ( "OFXHEADER:100\r\n" "DATA:OFXSGML\r\n" "VERSION:102\r\n" "SECURITY:NONE\r\n" "ENCODING:USASCII\r\n" "CHARSET:1252\r\n" "COMPRESSION:NONE\r\n" "OLDFILEUID:NONE\r\n" "NEWFILEUID:NONE\r\n" "\r\n" "\r\n" "\r\n" "\r\n" "20140427213800.000[-7:MST]\r\n" "1242940\r\n" "0732\r\n" "ENG\r\n" "\r\n" "America First Credit Union\r\n" "54324\r\n" "\r\n" "QWIN\r\n" "1200\r\n" "\r\n" "\r\n" "\r\n" "\r\n" "00000000\r\n" "\r\n" "\r\n" "324377516\r\n" "124294-0.9:CHK\r\n" "CHECKING\r\n" "\r\n" "\r\n" "20160101\r\n" "Y\r\n" "\r\n" "\r\n" "\r\n" "\r\n" "\r\n") #print(payload) response = requests.post('https://ofx.americafirst.com/', data=payload, headers=headers) print(response.status_code) print(response.headers) print(response.text)