Created
October 29, 2016 19:48
-
-
Save benrules2/79f8b3ada65bb17952d17cca454f04a6 to your computer and use it in GitHub Desktop.
Run Bet Bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == "__main__": | |
base_url = "https://api.pinnaclesports.com" | |
username = <username> | |
password = <password> | |
stake = 1.5 | |
balance = get_balance(base_url, username, password) | |
odds = get_sport_odds(base_url, username, password) | |
bet = find_bet(odds) | |
if len(bet) > 0: | |
get_bet_info(base_url, username, password, bet) | |
else: | |
print("No bets matching criteria") | |
if stake >= bet['minRiskStake'] and stake < balance['availableBalance']: | |
place_bet(base_url, username, password, bet, stake) | |
else: | |
print("Stake too small, or not enough funds") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment