mirror of
https://github.com/billbuchanan/appliedcrypto.git
synced 2026-02-21 11:18:02 +00:00
Update README.md
This commit is contained in:
@@ -42,50 +42,48 @@ Download and create the Python file defined on this page:
|
||||
|
||||
https://asecuritysite.com/encryption/bit
|
||||
```Python
|
||||
# https://asecuritysite.com/encryption/bit
|
||||
# Bitcoin details
|
||||
|
||||
import httplib2
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/latesthash")
|
||||
print "Latest hash: ",content
|
||||
print("Latest hash: ",content)
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/bcperblock")
|
||||
print "Block reward per block: ",float(content)/100000000.0
|
||||
print("Block reward per block: ",float(content))
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/getblockcount")
|
||||
print "Longest block: ",content
|
||||
print("Longest block: ",content)
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/getdifficulty")
|
||||
print "Difficulty: ",content
|
||||
print("Difficulty: ",content)
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/probability")
|
||||
print "Mining probability: ",content
|
||||
print("Mining probability: ",content)
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/interval")
|
||||
print "Average time between blocks (seconds): ",content
|
||||
print("Average time between blocks (seconds): ",content.decode())
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/eta")
|
||||
print "Time to next block (seconds): ",content
|
||||
print("Time to next block (seconds): ",content.decode())
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/marketcap")
|
||||
print "Market capitalisation (Million USD): ",float(content)/1000000
|
||||
print("Market capitalisation (Million USD): ",float(content)/1000000)
|
||||
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/24hrprice")
|
||||
print "24hr price (USD): ",content
|
||||
print("24hr price (USD): ",content.decode())
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/24hrtransactioncount")
|
||||
print "24hr transactions: ",content
|
||||
print("24hr transactions: ",content.decode())
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/hashrate")
|
||||
print "Hash rate: ",content
|
||||
print("Hash rate: ",content.decode())
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/addressbalance/1GbVUSW5WJmRCpaCJ4hanUny77oDaWW4to?confirmations=1")
|
||||
print "Account balance for 1Gb...4to (BTC): ",int(content)/100000000
|
||||
print("Account balance for 1Gb...4to (BTC): ",int(content)/100000000)
|
||||
|
||||
resp, content = httplib2.Http().request("https://blockchain.info/q/getreceivedbyaddress/1GbVUSW5WJmRCpaCJ4hanUny77oDaWW4to?confirmations=1")
|
||||
print "Received for 1Gb...4to (BTC): ",int(content)/100000000
|
||||
print("Received for 1Gb...4to (BTC): ",int(content)/100000000)
|
||||
|
||||
```
|
||||
|
||||
Now run the Python file, and compare the results in L.1.2.
|
||||
|
||||
Reference in New Issue
Block a user