coinmarketcap is an APACHE licensed library written in Python providing an easy to use wrapper around the coinmarketcap.com API. This library has been tested with Python 2.7.x and Python 3.6.x and uses.
To install the library:
$ pip install coinmarketcap
To get the steem/SBD price
from coinmarketcap import Market
coinmarketcap = Market()
Steem_market_price_USD= float(coinmarketcap.ticker('steem', convert='USD')[0]['price_usd'])
SBD_market_price_USD= float(coinmarketcap.ticker('steem-dollars', convert='USD')[0]['price_usd'])
print('Steem_market_price_USD',Steem_market_price_USD)
print('SBD_market_price_USD',SBD_market_price_USD)
I up-voted, but it is not working
First, names of variables can't start with big letter, did you even try your code?
Second, if I correct the name, I get error (I'm trying this 8 days later)
The coinmarketcap loads, you get an object, but lines bellow, parsing cause error.
Next time I will try your code first, before I give you upvote.
If you can show me the error information you got and you are still interested to get the code work, I really like to help you.Hi, @veleje, thanks for your reply.