Created
March 5, 2021 20:27
-
-
Save marianogappa/f9bc9f043edd7e1bf3f943c792735d08 to your computer and use it in GitHub Desktop.
Uniswap price alert
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
while sleep 60; do if [[ $(curl -s "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2" -d'{"query": "{tokenDayDatas(first: 1, orderBy: date, orderDirection: desc, where: { token: \"0xf7413489c474ca4399eee604716c72879eea3615\"}) { priceUSD } }"}' | jq -r '.data.tokenDayDatas[0].priceUSD' | tee /dev/tty | sed 's/$/ <= 1.2/' | bc) -eq "1" ]]; then say "buy APYS now"; fi; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment