Skip to content

Instantly share code, notes, and snippets.

@Porrapat
Created December 11, 2021 16:27
Show Gist options
  • Save Porrapat/9601abd55b00b447e6260ba14a64c1fa to your computer and use it in GitHub Desktop.
Save Porrapat/9601abd55b00b447e6260ba14a64c1fa to your computer and use it in GitHub Desktop.
API_KEY=
curl -s -H "X-CMC_PRO_API_KEY: $API_KEY" -H "Accept: application/json" -d "start=1&limit=5000&convert=USD" -G https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest > result.json
cat result.json | jq '.data[0].symbol'
cat result.json | jq '.data[0].quote.USD.price'
echo ""
cat result.json | jq '.data[1].symbol'
cat result.json | jq '.data[1].quote.USD.price'
echo ""
cat result.json | jq '.data[2].symbol'
cat result.json | jq '.data[2].quote.USD.price'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment