I find this page here, which tells me how much BTC is deposited to Binance. How does this (or a similar) page work?
When I deposit BTC to Binance, I am given an address, which I am fairly sure it's unique (since it doesn't ask other information to be supplied, so if it is not unique, I wouldn't be able to be identified).
How can I check that bitinfocharts is right? I know that on blockchain.com I can check the balance of an address, but what balance should I use if I am interested in Binance's balance?
Update
A function which takes a given block, and computes the net flow of BTC to each address:
import requests
def netbtcflow(blocknum):
r = requests.get('https://blockchain.info/block-height/'+str(blocknum)+'?format=json')
data = r.json()
transactions = [{} for x in range(len(data['blocks'][0]['tx']))]
for transactionindex, eachtransaction in enumerate(data['blocks'][0]['tx']):
address=[]
amount=[]
for eachrecipient in eachtransaction['out']:
try:
address.append(eachrecipient['addr'])
except KeyError:
address.append('KEYERROR')
amount.append(eachrecipient['value']/100000000)
try:
transactions[transactionindex]['from']=eachtransaction['inputs'][0]['prev_out']['addr']
except KeyError:
transactions[transactionindex]['from']='KEYERROR'
transactions[transactionindex]['to']=[address, amount]
netflowdict=[{} for x in range(len(transactions))]
for txindex, eachtx in enumerate(transactions):
#if eachtx['from']!='KEYERROR':
if True:
for recipaddress, recipamount in zip(*eachtx['to']):
if eachtx['from']!=recipaddress:
netflowdict[txindex]=[recipaddress, recipamount]
netflowdict=[each for each in netflowdict if bool(each)]
netflowdictunique=dict((each[0],0) for each in netflowdict)
for each in netflowdict:
netflowdictunique[each[0]]+=each[1]
netflowdict=netflowdictunique
return transactions, netflowdict
There are problems with this, for example this one. Would be interested in how to do the method outlined in this answer exactly (ie I would need the Ptyhon script). The above code might be helpful, will update the post if I get it to work.