Last active
April 29, 2021 21:30
-
-
Save leosoto/1bd18f0d188d03ff586b1f6add5f82f0 to your computer and use it in GitHub Desktop.
Get Risky Norris APV Share price and copy it to the macOS clipboard
This file contains hidden or 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
YESTERDAY=$(date -v -1d +"%Y-%m-%d") | |
REAL_ASSET_ID=245 # Fintual Risky Norris Serie APV | |
API_URL=https://fintual.cl/api/real_assets/$REAL_ASSET_ID/days?date=$YESTERDAY | |
PRICE=$(curl $API_URL | jq ".data[0].attributes.price") | |
echo "Copying $PRICE to clipboard" | |
echo "$PRICE" | pbcopy | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment