Hi guys,
I've written code to find the last month's soccer matches and download the bz2 files, but when I do, every file is returned with a bz2 file that simply states 'not logged in' with no data. If I log in to the website and download the same files manually, they work fine, with the usual bz2 data.
Confusingly, when I use the 'trading.historic.get_my_data()' function, it lists my purchases accurately, so clearly it's partly logged in.
I'm using the below code, amended to remove specifics, to log in.
####
# Change this certs path to wherever you're storing your certificates
certs_path = r'C:\Security'
# Change these login details to your own
my_username = "etc"
my_password = "etc"
my_app_key = "etc"
trading = betfairlightweight.APIClient(username=my_username,
password=my_password,
app_key=my_app_key,
certs=certs_path)
trading.login()
####
Thanks in advance for any help!!
I've written code to find the last month's soccer matches and download the bz2 files, but when I do, every file is returned with a bz2 file that simply states 'not logged in' with no data. If I log in to the website and download the same files manually, they work fine, with the usual bz2 data.
Confusingly, when I use the 'trading.historic.get_my_data()' function, it lists my purchases accurately, so clearly it's partly logged in.
I'm using the below code, amended to remove specifics, to log in.
####
# Change this certs path to wherever you're storing your certificates
certs_path = r'C:\Security'
# Change these login details to your own
my_username = "etc"
my_password = "etc"
my_app_key = "etc"
trading = betfairlightweight.APIClient(username=my_username,
password=my_password,
app_key=my_app_key,
certs=certs_path)
trading.login()
####
Thanks in advance for any help!!


Comment