bitforce icon indicating copy to clipboard operation
bitforce copied to clipboard

HTTP ERROR 404

Open mejohnny opened this issue 6 years ago • 3 comments

https://webbtc.com/address/

What should I do?

mejohnny avatar Apr 05 '19 07:04 mejohnny

same issue, any help?

artifyr avatar Apr 05 '20 09:04 artifyr

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

ghost avatar May 06 '20 20:05 ghost

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

sec13b avatar Apr 23 '23 18:04 sec13b