Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP ERROR 404 #2

Open
mejohnny opened this issue Apr 5, 2019 · 3 comments
Open

HTTP ERROR 404 #2

mejohnny opened this issue Apr 5, 2019 · 3 comments

Comments

@mejohnny
Copy link

mejohnny commented Apr 5, 2019

https://webbtc.com/address/

What should I do?

@artifyr
Copy link

artifyr commented Apr 5, 2020

same issue, any help?

@ghost
Copy link

ghost commented May 6, 2020

def balance(address):
    APIGet = requests.get(
-        "http://webbtc.com/address/" + str(address) + ".json")
+        "https://insight.bitpay.com/api/addr/" + str(address))
    if (APIGet.status_code == 429):
        pau.pau += 1
        if (pau.pau >= 10):
            print("\nUnable to connect to API\nRetrying in 10 seconds\n")
            time.sleep(30)
            pau.pau = 0
        return -1
    if (APIGet.status_code != 200 and APIGet.status_code != 404
            and APIGet.status != 429):
        print("\nHTTP Error Code: " + str(APIGet.status_code) +
              "\nRetrying in 10 seconds\n")
        time.sleep(10)
        return -1
    data = APIGet.json()
-    balance = int(data["balance"])
+    balance = int(data["balanceSat"])
    pau.pau = 0
    return balance

@sec13b
Copy link

sec13b commented Apr 23, 2023

insight from bitpay is deal , i see now use test.bitpay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants