Skip to content

Commit

Permalink
formatted bet output added log
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-pollak committed May 31, 2021
1 parent b55a1bd commit ccf27bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions matcher/each_way.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def evaluate_arb(driver, race):
race["place_stake"] = round(race["place_stake"] * stake_proportion, 2)

if not bet_profitable(race):
print("lay bet is not profitable")
return

stakes_ok = check_stakes(
Expand Down
6 changes: 4 additions & 2 deletions matcher/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def alert_low_funds(race):

def output_punt(race):
print(
f"""No Lay bet made ({datetime.now().strftime('%H:%M:%S')}): {race['horse_name']} - {race['bookie_odds']}
f"""
No Lay bet made ({datetime.now().strftime('%H:%M:%S')}): {race['horse_name']} - {race['bookie_odds']}
{race['race_time']} - {race['venue']}
Win odds: {race['win_odds']} Place odds: {race['place_odds']}
Expected Value: {round(race['exp_value'] * 100, 2)}% Expected Growth: {round(race['exp_growth'] * 100, 2)}% (£{format(race['exp_return'], '.2f')})
Expand All @@ -58,7 +59,8 @@ def output_punt(race):

def ouput_lay(race):
print(
f"""{race['bet_type']} bet made ({datetime.now().strftime('%H:%M:%S')}): {race['horse_name']}
f"""
{race['bet_type']} bet made ({datetime.now().strftime('%H:%M:%S')}): {race['horse_name']}
{race['race_time']} - {race['venue']}
Bookie odds: {race['bookie_odds']} - £{format(race['bookie_stake'], '.2f')} Lay win: {race['win_odds']} - £{format(race['win_stake'], '.2f')} Lay place: {race['place_odds']} - £{format(race['place_stake'], '.2f')}
Win profit: £{format(race['win_profit'], '.2f')} Place profit: £{format(race['place_profit'], '.2f')} Lose profit: £{format(race['lose_profit'], '.2f')}
Expand Down

0 comments on commit ccf27bf

Please sign in to comment.