Skip to content

Instantly share code, notes, and snippets.

@stevenc81
Created December 26, 2019 03:47
Show Gist options
  • Save stevenc81/ccf5be218635f3e4bcfb97a3410fa3c4 to your computer and use it in GitHub Desktop.
Save stevenc81/ccf5be218635f3e4bcfb97a3410fa3c4 to your computer and use it in GitHub Desktop.
if (total_borrow / total_supply) > 0.65 or liquidity < 10000000000000:
r = requests.post(
'https://api.mailgun.net/v3/<YOUR DOMAIN>/messages',
auth=('api', '<YOUR API KEY>'),
data={'from': 'DeFi Alerts <[email protected]>',
'to': ['<YOUR EMAIL ADDRESS>'],
'subject': "High utilization or low liquidity",
'text': f"Current rate {total_borrow / total_supply}\n" +
f"Current liquidity {liquidity / 1000000}"})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment