BC Exp 10 Output
BC Exp 10 Output
import requests
import pandas as pd
crypto_data = fetch_crypto_data('bitcoin')
crypto_data
timestamp price
import datetime
today = datetime.datetime.now().strftime('%Y-%m-%d')
one_week_ago = (datetime.datetime.now() - datetime.timedelta(days=7)).strftime('%Y-%m-%d')
news_data = fetch_news('bitcoin', one_week_ago, today)
news_data
publishedAt title description u
What
Happened From Bitcoin
2024-08- in Crypto bouncing back
0 https://finance.yahoo.com/news/happened-crypto
07T10:16:05Z Today: above 56K to
Bullish perman...
Signals...
Recent
Bitcoin
movements in
2024-08- Investors
1 the https://en.bitcoinhaber.net/bitcoin-investors
07T08:28:23Z Buy Puts
cryptocurrency
Aggressively
market ...
Google
@jason_kint:
Strategy
2024-08- wow an
def fetch_eth_block_data():
url = 'https://api.etherscan.io/api'
params = {
'module': 'block',
'action': 'getblockreward',
'blockno': '2165403',
'apikey': 'GJYHYZDW27Z4AEWYPSBGPIK4IWZMR2QIZC'
}
response = requests.get(url, params=params)
data = response.json()
return data['result']
block_data = fetch_eth_block_data()
block_str = json.dumps(block_data, indent=4)
print(f'Latest Ethereum Block Number: {block_str}')