betcode-org / betfair

betfairlightweight - Betfair API-NG python wrapper (with streaming)
MIT License
418 stars 146 forks source link

get_account_statement missing 1 required positional argument: 'fullMarketName' #495

Closed satruxag closed 1 year ago

satruxag commented 1 year ago

Good morning guys, to make the account report I have always used the "get_account_statement" method and it has always worked.

dateStart = datetime.datetime(2022, 8,30,0,0)
acct_statement_date_filter = betfairlightweight.filters.time_range(from_=dateStart)

account_statement = trading.account.get_account_statement(item_date_range=acct_statement_date_filter)

Since this morning instead I get this error

TypeError: __init__() missing 1 required positional argument: 'fullMarketName'

raise InvalidResponse(response=result)
betfairlightweight.exceptions.InvalidResponse: Invalid response received: {'accountStatement': [{'refId': '51365225816', 'itemD... 

the script was working for 7 days without any problem

liampauling commented 1 year ago

Due to the flaky nature of this endpoint it's recommended to use lightweight mode

trading.account.get_account_statement(item_date_range=acct_statement_date_filter, lightweight=True)