dvaz commited on
Commit
cd84626
1 Parent(s): 60a072c

Upload 20_Crypto.py

Browse files
Files changed (1) hide show
  1. pages/20_Crypto.py +30 -0
pages/20_Crypto.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import streamlit as st
3
+ import yfinance as yf
4
+ import streamlit.components.v1 as components
5
+ from requests_html import HTMLSession
6
+
7
+
8
+
9
+
10
+ st.set_page_config('Crypto',":moneybag:","wide",menu_items={'About': "This is an *extremely* cool app!"})
11
+
12
+
13
+
14
+ menu=['Chart']
15
+ ch=st.sidebar.selectbox('Menu',menu)
16
+
17
+ if ch== 'Chart':
18
+ with st.container():
19
+ list_asset = ['BTC-USD', 'ETH-USD', 'DOGE-USD']
20
+ ms = st.multiselect('choose asset', list_asset)
21
+ dates1 = st.date_input('from')
22
+ dates2 = st.date_input('to')
23
+ st.write('---')
24
+
25
+ if len(ms) > 0:
26
+ with st.container():
27
+ df = yf.download(ms, dates1, dates2)
28
+ st.write(df)
29
+ df2 = yf.download(ms, dates1, dates2)['Close']
30
+ st.line_chart(df2)