This endpoint provides up-to-the-minute crypto exchange rates relative to US dollars:
https://api.coinbase.com/v2/exchange-rates?currency=USD
`
Crypto is all the rage these days and I don't want to miss out! I want to keep 70% of my crypto holdings in BTC and 30% in ETH.
Write a function that takes the amount I have to spend in USD as a parameter and returns the number of Bitcoin and Ethereum to buy.
I have $X I want to keep in BTC and ETH, 70/30 split. How many of each should I buy?
Take the input amount as a command line parameter and print a json response with the allocations back out of your program.