Skip to content

Instantly share code, notes, and snippets.

@switzer
Created March 14, 2018 14:26
Show Gist options
  • Save switzer/710e3631c1d319e246129e16b6e42067 to your computer and use it in GitHub Desktop.
Save switzer/710e3631c1d319e246129e16b6e42067 to your computer and use it in GitHub Desktop.
Pull CoinMarketCap data into a CSV
curl https://api.coinmarketcap.com/v1/ticker/?limit=0 | jq -r '.[] | [."id", ."name", ."symbol", ."rank", ."price_usd", ."price_btc", ."24h_volume_usd", ."market_cap_usd", ."available_supply", ."total_supply", ."max_supply", ."percent_change_1h", ."percent_change_24h", ."percent_change_7d", ."last_updated"] | @csv' > coinmarketcap_$(date '+%Y%m%d%H%M%S').csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment