def unspentOutput(address, limit=250, confirmNum=6): # Multiple Addresses Allowed separated by "|" , Address can be base58 or xpub if limit > 1000: limit = 1000 url = "https://blockchain.info/unspent?active=" + address + "&limit=" + str(limit) + "&confirmations=" + str( confirmNum) return str2Object(NetIO.readDataFrom(url))
def addressesQuery(addresses): query = '' for add in addresses: query += add + "|" url = "https://blockchain.info/multiaddr?active=" + query[0:-1] return str2Object(NetIO.readDataFrom(url))
def addressQuery(address): url = "https://blockchain.info/rawaddr/" + address return str2Object(NetIO.readDataFrom(url))
def balanceQuery(address): # Multiple Addresses Allowed separated by "|" , Address can be base58 or xpub url = "https://blockchain.info/balance?active=" + address return str2Object(NetIO.readDataFrom(url))
def blockHeight(block_height): url = "https://blockchain.info/block-height/" + block_height + "?format=json" return str2Object(NetIO.readDataFrom(url))
def transactionQuery(tx_hash): url = "https://blockchain.info/rawtx/" + tx_hash return str2Object(NetIO.readDataFrom(url))
def blockQuery(block_hash): url = "https://blockchain.info/rawblock/" + block_hash return str2Object(NetIO.readDataFrom(url))