Reputation: 13
I use API:
https://www.blockchain.com/api/q
Trying to make a Get request:
url = 'https://www.blockchain.info/api/q/getreceivedbyaddress/' + strpod + '?confirmations=6'
zapros = requests.get(url)
But it returns the entire page.
And I only need the balance value.
Please help me.
Upvotes: 0
Views: 120
Reputation: 1803
import requests
address = "17LREmmnmTxCoFZ59wfhg4S639GsPqjTRT"
URL = "https://blockchain.info/q/getreceivedbyaddress/"+address+"?confirmations=6"
r = requests.get(url = URL)
# extracting balance ((in satoshi))
bt_balance = r.json()
The API link is not wrong. Please check with the blockchain addresss
Upvotes: 1