Phew. Here is the results from my first successful run of the script generously provided by dooglus, and translated into Python by copilot. I'm not sure how to update all the previous days, but maybe that will take care of itself post haste.
Update: 1 2021-11-08 67482.75 USD
2 2021-11-09 66256.31 USD
3 2021-11-07 65762.15 USD
4 2021-10-19 65701.83 USD
5 2021-11-14 65064.03 USD
6 2021-11-10 64931.06 USD
7 2021-10-20 64502.06 USD
8 2021-11-13 64456.32 USD
9 2021-11-12 64112.66 USD
10 2021-11-11 63900.23 USD
11 2021-04-13 63314.69 USD
12 2021-10-18 63168.10 USD
13 2021-04-14 62948.87 USD
14 2021-10-24 62745.33 USD
15 2021-11-02 62607.52 USD
16 2021-11-01 62446.75 USD
17 2021-11-06 62216.42 USD
18 2021-04-12 62142.81 USD
19 2024-02-28 62116.68 USD20 2024-02-29 62096.79 USD[/pre]
co-pilot code
import requests
from datetime import datetime
def fetch_bitcoin_data(days=1200, top=20, currency='USD'):
url = f"http://bitcoincharts.com/charts/chart.json?m=bitstampUSD&r={days}&i=Daily"
# Disable SSL certificate verification (use with caution!)
response = requests.get(url, verify=False)
data = response.json()
rows = [(entry[0], entry[7]) for entry in data]
sorted_rows = sorted(rows, key=lambda x: x[1], reverse=True)
newest = sorted_rows[-1][0]
print("Update:")
print("[pre]")
for n, (timestamp, vwap) in enumerate(sorted_rows[:top], start=1):
is_recent = "[b]" if timestamp > (datetime.now().timestamp() - 60 * 60 * 24 * 32) else ""
is_newest = "[color=#7F0000]" if timestamp == newest else ""
print(f"{is_recent}{is_newest}{n:2d} {datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d')} {vwap:.2f} {currency}{is_newest}{is_recent}")
print("[/pre]")
if __name__ == "__main__":
fetch_bitcoin_data()
Thanks for working on this, and figuring out a way to resume an orderly listing of these weighted top days for our lillie fiend, aka bitcoin.
Of course, my posts from the last couple of days show the raw data from the bitcoincharts.com website, yet I wonder why there is a discrepancy between your script-run data and the data that I had copy pasted from the raw data, namely the dates seem to be off-by-one day for the $62,116.68 and the $62,096.79? Your script-run data shows 2/28 and 2/29 respectively, while the raw data shows 2/29 and 3/1 for those two weighted price results.
hey does someone want to do this for some btc?
to sure what to pay or offer to pay.
Wow. If you did choose to reward me, i would prefer you to forward that to talkimg.com
I'm working on a longer list with table headings.
Of course, you can choose that a charity receive any donations rather than you (and talkim.com is doing a great service for the forum). That's your choice.
If you were to choose to directly receive some donations, you could also communicate any BTC or lightning address privately through DMs and that would likely be acceptable in the case that you are preferring to maintain some privacy..
We know that sometimes there can be problems with reusing bitcoin addresses, too, which brings some additional value in terms of receiving bitcoin or something related in private and/or individualized ways rather than publicizing a bitcoin receiving address.... saving fees with lighting network too, and some of us guys like to experiment with sending BTC too, so I would not even consider it greedy to receive several hundreds of thousands of satoshis and even into the millions of satoshis that are up to the members to choose how much to send or to otherwise interact with you about ways of receiving.
On a few occasions, I have refused to receive payments from other members, and there were also times that funds were sent to my forum BTC addresses that seemed like dust payments.. so in that sense I can see why you might have some reluctancies in wanting to receive payments from other members, even if some of them may want to legitimately pay you because we feel benefits from the work that you might end up doing that benefits all of us and perhaps future generations in some way.. not to be too grandiose in my attempt to state the potential impact.