Skip to content

Instantly share code, notes, and snippets.

@emirhg
Last active February 21, 2021 10:08
Show Gist options
  • Save emirhg/ccc2d4feddbc47ffc915b23fff4d8ad4 to your computer and use it in GitHub Desktop.
Save emirhg/ccc2d4feddbc47ffc915b23fff4d8ad4 to your computer and use it in GitHub Desktop.
Get last Bitso Cryptocurrencies prices
# This Command retrives te lasts Crypto currencies prices on MXN from Bitso and writes a CSV file propper for GNUCash Importation
curl "https://api.bitso.com/v3/ticker" | jq -r '.payload | map([.book, .last]) | .[] | @csv' | sed -e "s/_/\",\"/g;s/^/\"$(date +%Y-%m-%dT%H:%M:%S%z)\",\"CRYPTOCURRENCY\",/g" | tr a-z A-Z > /tmp/security_prices.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment