-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy paththormiddec.py
100 lines (70 loc) · 1.78 KB
/
thormiddec.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import streamlit as st
import plotly
import plotly.express as px
import pandas as pd
import json
st.title("THOR MID DEC")
query_id = "bc3fd76c-5e84-4b77-9575-8e883da90a91"
df = pd.read_json(
f"https://api.flipsidecrypto.com/api/v2/queries/{query_id}/data/latest",
convert_dates=["TIMESTAMP_NTZ"],
)
t_f = False
st.sidebar.write("Choose y-axis scale")
check = st.sidebar.checkbox("Linear/Log")
if check:
t_f = True
#-------------------------------------------------------
st.markdown("""
LP RANK, POOLS AND ACTIONS""")
df = px.bar(
df, #this is the dataframe you are trying to plot
x = "RANK",
y = "POOLZ",
orientation = "v",
# color = "TO_ADDRESS_NAME",
template = "plotly_white",
width = 1000,
height = 600,
log_y = t_f
)
st.plotly_chart(df)
query_id = "bc3fd76c-5e84-4b77-9575-8e883da90a91"
df = pd.read_json(
f"https://api.flipsidecrypto.com/api/v2/queries/{query_id}/data/latest",
convert_dates=["TIMESTAMP_NTZ"],
)
st.markdown("""
THOR ACTIONS""")
df = px.bar(
df, #this is the dataframe you are trying to plot
x = "RANK",
y = "LP_ACTIONS",
orientation = "v",
# color = "TO_ADDRESS_NAME",
template = "plotly_white",
width = 1000,
height = 600,
log_y = t_f
)
st.plotly_chart(df)
query_id = "02c1a44e-f003-4a43-92b3-da6d17c1bc88"
df = pd.read_json(
f"https://api.flipsidecrypto.com/api/v2/queries/{query_id}/data/latest",
convert_dates=["TIMESTAMP_NTZ"],
)
st.markdown("""
RUN, XRUNE, THOR Prices
""")
df = px.scatter(
df, #this is the dataframe you are trying to plot
x = "HOURZ",
y = ["RUNE_PRICE","THOR_PRICE","XRUNE_PRICE"],
orientation = "v",
# color = "TO_ADDRESS_NAME",
template = "plotly_white",
width = 1000,
height = 600,
log_y = t_f
)
st.plotly_chart(df)