Well my idea is to create a program that takes the data of the crypto-coins quotations so that I can keep track of them, but I do not know how to get this data live and make the program keep updating the data.
Well my idea is to create a program that takes the data of the crypto-coins quotations so that I can keep track of them, but I do not know how to get this data live and make the program keep updating the data.
You can use the suggestions from:
They are all via HTTP and paid, the one marked as free is for the Excel program and I do not think it will serve for this, the example that seems more interesting is the Bolsafinanceira, follow the link how to use:
Rate tables:
In Python 3 you can use urllib.request
with json
import json
import urllib.request
url = "http://api.bolsafinanceira.com:8080/composition/?token=<seu-token>&codelist=ibovespa,ibrx50"
with urllib.request.urlopen(urlData) as f:
data = f.read()
encoding = f.info().get_content_charset('utf-8')
json.loads(data.decode(encoding))
Or use import requests
To install, use the command:
pip install requests
Or pipenv (depends on your environment)
pipenv install requests
It should look like this:
import requests
url = 'http://api.bolsafinanceira.com:8080/composition/?token=<seu-token>&codelist=ibovespa,ibrx50';
r = requests.get(url, print=pretty')
# Exibe a resposta
print(r.json())