Hi,
I'm new to python and betfair so please be patient. I'm having issues getting my account's funds from my python code (getAccountFunds). I've been able to get it from the API visualiser so I think that my session token and app key are correct, but always get an error when calling it from my code.
Could anyone please help me figure out what's wrong with the code below?
account_url = "https://api.betfair.com/exchange/account/json-rpc/v1/"
headers = { 'X-Application' : app_key, 'X-Authentication' : session_token ,'content-type' : 'application/json' }
req = '{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/getAccountFunds"}'
response = requests.post(account_url, data=req, headers=headers)
print(response.json())
I'm always getting the following error: {'jsonrpc': '2.0', 'error': {'code': -32601, 'message': 'DSC-0021'}}
I've tried it with different method names
req = '{"jsonrpc": "2.0", "method": "getAccountFunds"}'
but i'm also getting the same error...
All my betting requests (listEventTypes, ListMarketCatalogue, etc...) work fine.
Thanks for the help
I'm new to python and betfair so please be patient. I'm having issues getting my account's funds from my python code (getAccountFunds). I've been able to get it from the API visualiser so I think that my session token and app key are correct, but always get an error when calling it from my code.
Could anyone please help me figure out what's wrong with the code below?
account_url = "https://api.betfair.com/exchange/account/json-rpc/v1/"
headers = { 'X-Application' : app_key, 'X-Authentication' : session_token ,'content-type' : 'application/json' }
req = '{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/getAccountFunds"}'
response = requests.post(account_url, data=req, headers=headers)
print(response.json())
I'm always getting the following error: {'jsonrpc': '2.0', 'error': {'code': -32601, 'message': 'DSC-0021'}}
I've tried it with different method names
req = '{"jsonrpc": "2.0", "method": "getAccountFunds"}'
but i'm also getting the same error...
All my betting requests (listEventTypes, ListMarketCatalogue, etc...) work fine.
Thanks for the help


Comment