Reputation: 21
For a little project on Arduino, i'm trying to read information of my miners on NANOPOOL with PYTHON.
But, there is a problem, and i don't find the solution.
This is my code:
import requests
address='t1UtZktQLxzxyonziphEsrXzD6xdLheevQH'
content=requests.get('https://api.nanopool.org/v1/zec/avghashrate/:address', params=address)
data=content.json()
t=data['data']['h1']
print(t)
API nanopool : https://zec.nanopool.org/api#api-Miner-AverageHashrates
I should receive "624.16" with this example : { "status": true, "data": { "h1": 624.16, "h3": 679.30, "h6": 719.41, "h12": 691.21, "h24": 636.37 } }
But i receive "0"
I think it is a problem with address, but i don't find a solution ! Someone can help me ?
Upvotes: 1
Views: 615
Reputation: 21
I find the solve ! i must insert the adresse in the url like that : https://api.nanopool.org/v1/zec/avghashrate/t1UtZktQLxzxyonziphEsrXzD6xdLheevQH
Upvotes: 1