12 lines
289 B
Python
12 lines
289 B
Python
|
|
from urllib.request import urlopen
|
||
|
|
import json
|
||
|
|
|
||
|
|
url = "http://indexer.cauldron.quest/cauldron/tvl/9999999999"
|
||
|
|
|
||
|
|
with urlopen(url) as response:
|
||
|
|
data = json.load(response)
|
||
|
|
total_satoshis = sum(item["satoshis"] for item in data)
|
||
|
|
print(f"Total BCH: {total_satoshis / 100000000}")
|
||
|
|
|
||
|
|
|