He’s a step-by-step n hu on hood to create with Etherreeum can use matlotlib in Python:
`
comfort
ports are pumpkin.pyplose
business
important number of mup
impotent of the financial ministry.
tremendous team timetime timetime, tissue
Get the curent time (will be displayed to the x-axis)
start_date = dated timetime.today(’%-%m-%m’)
end_date = (datetime.today(days=30).
Defected the API endpoint for Ethereum prices
apEndpoint = “
Set the API request
paramms = {
‘symbol’: ‘ENTH’,
‘interval’: ‘1m’,
‘limi’: 100,
Max numbn up to retrieves to retrieve
‘time Rage: start_date + ‘,’ + end_date,
}
Send the API request and get the responsibility
responsibility = Yf.ge(aperpoint, paramises)
Convert the responsance for DataFrame.
df = pd.DatFrame(response).
Create the x-axis dates (index) is from 1 to 100 (assuming we need at a leist 100 data points)
date = np.rane(1, lif..culumns)
Set the format for maillotlib
plt.gate.gaxis.set_maur/medates.DateFormamater(threw-%m-%m’))
Plandle chart
pt. Heare(figsize(14,10)
for we range(dates)-1):
plt.plot([the0.01, (the+1)0.01], [df.loc [they,’ clues’].mean(), dfic[i+1,’close’].mean()’close() ], colour
iif not (i = == lenf.culumns) – 2):
do not the last candle
plt.plove([the0.01, the0 legurial
elected (i = be(df.culums) – 2):
do nott plost candle
plt.plot([i0.01, the0 legurial
pt.xlabel(Date’)
plt.ylabel(ASD)’)
plttestle(“Etherumander Chart”)
plt.show()
“s
To raw this, you need to have the required pounds of an installed required installed (’s been slaughtered, snap and yinfinance’). You all need to Binance API key.
Please sympathy API will endpoint the corresks of forgiveness to per down your API documentation.
发表回复