From 7aebf2b92faffcf8b8299de378e0ffa607d4962f Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 5 Dec 2024 15:35:09 +1100 Subject: [PATCH] feat: Add new api routes and updated chart --- cache/10118a51009b13b2592c87579e15e61e.json | 2 +- cache/1ccff5c6f117409fea0c861aa44b8e62.json | 2 +- cache/29409a8a40dd2d547a7a44b8f6758f54.json | 2 +- cache/4104ed0427efe63d4ca0dead970a4391.json | 2 +- cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json | 2 +- cache/6eec370e2713cfc84c84e1080b8a191a.json | 2 +- cache/790b28a9a21cf694ad9577ef1072ac9e.json | 2 +- cache/94ac30c93587c50252ac382a8d02257f.json | 2 +- cache/a071d7bdda25c22e42ad7840f17c4b0e.json | 2 +- cache/a0ee60913ba556f39d128e7d7249e788.json | 2 +- cache/b81351778df9f812bbd75ee85a7a073e.json | 2 +- cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json | 2 +- server.py | 67 +++++- stWDBRN.bsdesign | Bin 491055 -> 491981 bytes templates/assets/js/bs-init.js | 7 + templates/index.html | 221 +++++++++++++++----- 16 files changed, 248 insertions(+), 71 deletions(-) create mode 100644 templates/assets/js/bs-init.js diff --git a/cache/10118a51009b13b2592c87579e15e61e.json b/cache/10118a51009b13b2592c87579e15e61e.json index 2d5b3ba..c1b9204 100644 --- a/cache/10118a51009b13b2592c87579e15e61e.json +++ b/cache/10118a51009b13b2592c87579e15e61e.json @@ -1 +1 @@ -{"timestamp": 1733367496.996954, "result": "120"} \ No newline at end of file +{"timestamp": 1733371180.803243, "result": "120"} \ No newline at end of file diff --git a/cache/1ccff5c6f117409fea0c861aa44b8e62.json b/cache/1ccff5c6f117409fea0c861aa44b8e62.json index 0f03aad..fe2e1e5 100644 --- a/cache/1ccff5c6f117409fea0c861aa44b8e62.json +++ b/cache/1ccff5c6f117409fea0c861aa44b8e62.json @@ -1 +1 @@ -{"timestamp": 1733367305.82001, "result": 1.18} \ No newline at end of file +{"timestamp": 1733370947.4475856, "result": 1.19} \ No newline at end of file diff --git a/cache/29409a8a40dd2d547a7a44b8f6758f54.json b/cache/29409a8a40dd2d547a7a44b8f6758f54.json index 2be2c0d..2e88c24 100644 --- a/cache/29409a8a40dd2d547a7a44b8f6758f54.json +++ b/cache/29409a8a40dd2d547a7a44b8f6758f54.json @@ -1 +1 @@ -{"timestamp": 1733367305.1029575, "result": 4.18} \ No newline at end of file +{"timestamp": 1733370946.7141268, "result": 4.2} \ No newline at end of file diff --git a/cache/4104ed0427efe63d4ca0dead970a4391.json b/cache/4104ed0427efe63d4ca0dead970a4391.json index 00ef5cc..e8ecc7b 100644 --- a/cache/4104ed0427efe63d4ca0dead970a4391.json +++ b/cache/4104ed0427efe63d4ca0dead970a4391.json @@ -1 +1 @@ -{"timestamp": 1733367303.484976, "result": 248.08} \ No newline at end of file +{"timestamp": 1733370945.6919894, "result": 249.75} \ No newline at end of file diff --git a/cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json b/cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json index ffbe00e..fb8fb82 100644 --- a/cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json +++ b/cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json @@ -1 +1 @@ -{"timestamp": 1733367300.1864865, "result": 231.97} \ No newline at end of file +{"timestamp": 1733370941.0851188, "result": 234.61} \ No newline at end of file diff --git a/cache/6eec370e2713cfc84c84e1080b8a191a.json b/cache/6eec370e2713cfc84c84e1080b8a191a.json index 130faec..750de0b 100644 --- a/cache/6eec370e2713cfc84c84e1080b8a191a.json +++ b/cache/6eec370e2713cfc84c84e1080b8a191a.json @@ -1 +1 @@ -{"timestamp": 1733367298.2447531, "result": 120.0} \ No newline at end of file +{"timestamp": 1733370937.8074176, "result": 120.0} \ No newline at end of file diff --git a/cache/790b28a9a21cf694ad9577ef1072ac9e.json b/cache/790b28a9a21cf694ad9577ef1072ac9e.json index c62859e..85b7b8d 100644 --- a/cache/790b28a9a21cf694ad9577ef1072ac9e.json +++ b/cache/790b28a9a21cf694ad9577ef1072ac9e.json @@ -1 +1 @@ -{"timestamp": 1733365705.1888373, "result": 0.006517062} \ No newline at end of file +{"timestamp": 1733370648.2231722, "result": 0.006517062} \ No newline at end of file diff --git a/cache/94ac30c93587c50252ac382a8d02257f.json b/cache/94ac30c93587c50252ac382a8d02257f.json index ae276d0..a2ba15e 100644 --- a/cache/94ac30c93587c50252ac382a8d02257f.json +++ b/cache/94ac30c93587c50252ac382a8d02257f.json @@ -1 +1 @@ -{"timestamp": 1733367300.1870453, "result": 1.5117628721399998} \ No newline at end of file +{"timestamp": 1733370941.0857272, "result": 1.52896791582} \ No newline at end of file diff --git a/cache/a071d7bdda25c22e42ad7840f17c4b0e.json b/cache/a071d7bdda25c22e42ad7840f17c4b0e.json index 8b8a8fc..e765fda 100644 --- a/cache/a071d7bdda25c22e42ad7840f17c4b0e.json +++ b/cache/a071d7bdda25c22e42ad7840f17c4b0e.json @@ -1 +1 @@ -{"timestamp": 1733367301.6211267, "result": 1.001} \ No newline at end of file +{"timestamp": 1733370944.0799723, "result": 1.001} \ No newline at end of file diff --git a/cache/a0ee60913ba556f39d128e7d7249e788.json b/cache/a0ee60913ba556f39d128e7d7249e788.json index 9cf1b9f..77d0a65 100644 --- a/cache/a0ee60913ba556f39d128e7d7249e788.json +++ b/cache/a0ee60913ba556f39d128e7d7249e788.json @@ -1 +1 @@ -{"timestamp": 1733367305.106161, "result": [{"mint": "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v", "balance": 0.039815492, "price": 248.08, "value": 9.87742725536, "name": "Jupiter Staked SOL", "symbol": "jupsol"}, {"mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4", "balance": 2.402337, "price": 4.18, "value": 10.04176866, "name": "Jupiter Perpetuals Liquidity Provider Token", "symbol": "jlp"}]} \ No newline at end of file +{"timestamp": 1733370946.7175624, "result": [{"mint": "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v", "balance": 0.039815492, "price": 249.75, "value": 9.943919127000001, "name": "Jupiter Staked SOL", "symbol": "jupsol"}, {"mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4", "balance": 2.402337, "price": 4.2, "value": 10.0898154, "name": "Jupiter Perpetuals Liquidity Provider Token", "symbol": "jlp"}]} \ No newline at end of file diff --git a/cache/b81351778df9f812bbd75ee85a7a073e.json b/cache/b81351778df9f812bbd75ee85a7a073e.json index 1bba464..f1f200d 100644 --- a/cache/b81351778df9f812bbd75ee85a7a073e.json +++ b/cache/b81351778df9f812bbd75ee85a7a073e.json @@ -1 +1 @@ -{"timestamp": 1733367305.8206198, "result": 119.1529266475} \ No newline at end of file +{"timestamp": 1733370947.4478178, "result": 120.11282257281998} \ No newline at end of file diff --git a/cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json b/cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json index 7097bd8..bb86980 100644 --- a/cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json +++ b/cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json @@ -1 +1 @@ -{"timestamp": 1733367305.512328, "result": 82.815227} \ No newline at end of file +{"timestamp": 1733370947.155014, "result": 82.815227} \ No newline at end of file diff --git a/server.py b/server.py index 3f150fe..1db9dc6 100644 --- a/server.py +++ b/server.py @@ -124,7 +124,7 @@ def index(): pie_chart_data.append( ("ADA", cardanoBalance, f"Cardano: ${cardanoBalance}")) - return render_template("index.html", value=tokenValue, supply=tokenSupply, pie_chart=pie_chart_data, vault=vaultBalance) + return render_template("index.html", value=tokenValue, supply=tokenSupply, vault=vaultBalance) @app.route("/") @@ -334,7 +334,7 @@ def api_token(): token[t["symbol"].upper()]["amount"] = t["balance"] / supply token[t["symbol"].upper()]["value"] = t["price"] * t["balance"] / supply # Round value to 4 decimal places - token[t["symbol"].upper()]["value"] = round(token[t["symbol"].upper()]["value"], 4) + token[t["symbol"].upper()]["value"] = round(token[t["symbol"].upper()]["value"], 2) token[t["symbol"].upper()]["amount"] = round(token[t["symbol"].upper()]["amount"], 4) # Remove balance key @@ -344,13 +344,18 @@ def api_token(): token["ADA"] = { "name": "Cardano", - "amount": getCardanoBalance(vault_cardano_address) / supply, - "value": getCardanoValue(vault_cardano_address) / supply + "amount": round(getCardanoBalance(vault_cardano_address) / supply,4), + "value": round(getCardanoValue(vault_cardano_address) / supply,2) } if token["ADA"]["value"] < 0.01: token["ADA"]["amount"] = 0 token["ADA"]["value"] = 0 + # For each key add tooltip + for key in token: + token[key]["tooltip"] = f"{token[key]['amount']} {key} (${token[key]['value']})" + + token["total"] = { "name": "stWDBRN", "description": "stWDBRN total value (USD)", @@ -361,6 +366,60 @@ def api_token(): return jsonify(token) +@app.route("/api/v1/vault") +def api_vault(): + tokens = getTokens() + vaultBalance = getVaultBalance() + vaultBalance = "{:.2f}".format(vaultBalance) + + + vault = {} + vault["SOL"] = { + "name": "Solana", + "amount": round(getSolBalance(),4), + "value": round(getSolValue(),2) + } + if vault["SOL"]["value"] < 0.01: + vault["SOL"]["amount"] = 0 + vault["SOL"]["value"] = 0 + + vault["ADA"] = { + "name": "Cardano", + "amount": round(getCardanoBalance(vault_cardano_address),4), + "value": round(getCardanoValue(vault_cardano_address),2) + } + if vault["ADA"]["value"] < 0.01: + vault["ADA"]["amount"] = 0 + vault["ADA"]["value"] = 0 + + for t in tokens: + vault[t["symbol"].upper()] = t + if vault[t["symbol"].upper()]["value"] < 0.01: + vault[t["symbol"].upper()]["amount"] = 0 + vault[t["symbol"].upper()]["value"] = 0 + else: + vault[t["symbol"].upper()]["amount"] = t["balance"] + vault[t["symbol"].upper()]["value"] = t["price"] * t["balance"] + # Round value to 4 decimal places + vault[t["symbol"].upper()]["value"] = round(vault[t["symbol"].upper()]["value"], 2) + vault[t["symbol"].upper()]["amount"] = round(vault[t["symbol"].upper()]["amount"], 4) + + # Remove balance key + del vault[t["symbol"].upper()]["balance"] + + # For each key add tooltip + for key in vault: + vault[key]["tooltip"] = f"{vault[key]['amount']} {key} (${vault[key]['value']})" + + vault["total"] = { + "name": "Vault", + "description": "Total Vault value (USD)", + "value": vaultBalance + } + + return jsonify(vault) + + # endregion diff --git a/stWDBRN.bsdesign b/stWDBRN.bsdesign index 7c0d54d976bb94b45f5cd2029bcd36f1ca830c2a..2a92899ba829ec0d9f438c798094e8357160d28d 100644 GIT binary patch delta 15988 zcmV-)K8wMx{2k4M9*|oGj=-QG3#3UvGqFo=Dg&4&Q_59!8V(&BCHTA7>SFi5<;T$Q6%#0}` zg3O3iiBbCPY{%nCsbVE5ua*sAN?teG;-bE0WMf#GbnpOd@)S|oRPmTG5s$TE*Pf|X zEU`&ZOJG;)jbH7WiRI@)7N951 zbyBh5v|mAvvA1#%lR(aRd=?AvjG`y; zyc%2^2lNR%ih#(XK^mXobXhX_UEI4$T;2D3ayLzBFOmujgZWz02tts6w;} zKu1^QiCdrIxgE*&;o286-{6I^?cm;o) zL`4`=Fl348mV@Wnckk@9@^mA2y6Yr*S*|CCX2%nEZw;)9I6x1`0It-qsU^UA(DoI4GG$3~A3b;ZiV%^WTt3wC#0)H3Ja}z(cYlneY z0Wst;)(gaTmC^%xrlHSu42{6b8U+Uqg}UQtJw2kN z7*2gnNPhsHK*qb8D6;=meuFIsXSTiMWpP!6!g!A|}l zH5pAmEes5x}tWX>Ef*aP>Jr8}8}l z-5l>XaephyreN!J1AvQlxq^gL8{pWR!xZ;?{cw1qLM*|G0fmL&t-%z5lIrKOp)?$k zeqKGjK%Uv?Se3U`gxUe^ z3&N`F>Ota{7~YtfagiBYM|d5}qpLdcHKoOz6IW=1KEjygm1YlVRjkYxfYU5w>2-7B+VxD zqq347+zVkd?uOCR+3%jyESE7QDWxx-H-lvr`bHmVPHu~*Lo8Xf=kRBW>C$YyoF*@? zWs<(p7E`V{7!H(I2K+7Smn+?k5W}2V{nnn#ts(9Pd*f&kqJ2paBFBF|;_flARFrzH zC*T=vHKUSAeDEx(Or|wS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OU>Xbe-9De>%L)tvC$~;Q;H0*bW?_L+=cRzf7 zUM5*m$M1f#GCt&0y*qr@?XK+0F8klUPJgZ4u>Yp#;Wdf2Y`S-c?_TpSzWXLS_lwo_ z#h{;asn`#l|HlzNVn^!Z%pWs(cS_$F@Mn}%&y%;+@~5h{zWd~%zWY>9_-V0q$-XK3 zBg+j058PS@RlcwP^$^65v41N#d&6k&cKEQuKIIyGovHu2E%;p7`kEr|zPA0}2Y=`% z@|%K09?Ookc<2Dq26-{p13v7}=fY6;zyP=(Jhb~N^%Vo#d zitRGN!WBjLK!HcYkER+g(^?WCKlDhJJ*}vXx6)#XVyFkupJBt7woM z(=>I(TZ>=nBbEHq@O2J=slPR;Yk1GX*Q_$$Kh+e@g8lXnDm$z<^KyCh<^OA40s{PQ zTj{l*JJn`R0QlR#f@`iEK$yxccI2n%xDEXqMT0-E| z5|~>{$XGpLA;p+Tp(wTz29LoXp?K6(2>^ieM3~jJVj`%Q6hU)gn18{w!hy5!vrcni zn60(K%&iw@Zgb&mv9;MkgR>=V&YDU$6mKrSbV`=qzW*wH8zN({mca0{n$iZAdkauJ z-&w%6-q9vD#1C9UZH*p$AQZ9PIqY6A%B3Dpo%P)^tI5n13z>| zLkApqMuf-Y?Bp1V$Tu*j+It9M*2WC?@EM?Pv=gD6o8% z@I%?CUy4TE7A5E97v%!fF#av!x z&)&)S0K4_R-8!O-J#W9hyrwLxpN&+5BM*jkQGfZNFl?YO{Hk_Ci@}nmNWACHY{S-F z$DjC4v4eP1I_)L*m#EHg1zQow$e9&dsLxOupjSR#%%&61zILwu6hTi6KYg0`r@`=_ z@$4v>jV^}C!PU`afA{q0^kb(<b C3G>GQ diff --git a/templates/assets/js/bs-init.js b/templates/assets/js/bs-init.js new file mode 100644 index 0000000..3c1498d --- /dev/null +++ b/templates/assets/js/bs-init.js @@ -0,0 +1,7 @@ +document.addEventListener('DOMContentLoaded', function() { + + var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bss-tooltip]')); + var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { + return new bootstrap.Tooltip(tooltipTriggerEl); + }) +}, false); \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 4e6461c..86ed6b9 100644 --- a/templates/index.html +++ b/templates/index.html @@ -47,68 +47,178 @@
-

Current Vault Contents

+

Current Vault Contents

+
View on Coingecko + + async function fetchData(apiUrl) { + try { + const response = await fetch(apiUrl); + if (!response.ok) throw new Error('Failed to fetch data from API'); + return await response.json(); + } catch (error) { + console.error('Error fetching data:', error); + return null; + } + } + + function transformDataForChart(data) { + const chartData = []; + for (const token in data) { + if (token !== 'total') { + chartData.push([ + token, // Label for the chart + data[token].value, // Value for the chart + data[token].tooltip, // Tooltip for the chart + ]); + } + } + return chartData; + } + + async function drawChart() { + const apiUrl = '/api/v1/vault'; + const data = await fetchData(apiUrl); + + if (!data) return; // Exit if data fetch fails + + const chartDataTable = new google.visualization.DataTable(); + chartDataTable.addColumn('string', 'Token'); + chartDataTable.addColumn('number', 'Value'); + chartDataTable.addColumn({ type: 'string', role: 'tooltip', 'p': { 'html': false } }); + chartDataTable.addRows(transformDataForChart(data)); + + chart = new google.visualization.PieChart(document.getElementById('pie-chart')); + resizeAndDraw(chart, chartDataTable, options); + updateText(true); + populateTable(data); + } + + function updateText(isVault) { + let headerText = document.getElementById('chart-header'); + if (isVault) { + headerText.innerText = 'Current Vault Contents'; + } else { + headerText.innerText = 'Current Per Token Holding'; + } + } + + function populateTable(data) { + const tableContainer = document.getElementById('data-table'); + tableContainer.innerHTML = ''; // Clear previous table data + + // Create table elements + const table = document.createElement('table'); + table.style.margin = 'auto'; + table.style.borderCollapse = 'collapse'; + + const thead = document.createElement('thead'); + const tbody = document.createElement('tbody'); + + // Create table header + const headerRow = document.createElement('tr'); + ['Name', 'Amount', 'Value'].forEach(headerText => { + const th = document.createElement('th'); + th.textContent = headerText; + th.style.border = '1px solid #ccc'; + th.style.padding = '8px 20px'; + th.style.backgroundColor = '#333'; + th.style.color = 'white'; + headerRow.appendChild(th); + }); + thead.appendChild(headerRow); + + // Create table rows + for (const token in data) { + if (token !== 'total') { + const row = document.createElement('tr'); + + const nameCell = document.createElement('td'); + nameCell.textContent = data[token].name; + nameCell.style.border = '1px solid #ccc'; + nameCell.style.padding = '8px 20px'; + + const amountCell = document.createElement('td'); + amountCell.textContent = `${data[token].amount} ${token}`; + amountCell.style.border = '1px solid #ccc'; + amountCell.style.padding = '8px 20px'; + + const valueCell = document.createElement('td'); + valueCell.textContent = data[token].value; + valueCell.style.border = '1px solid #ccc'; + valueCell.style.padding = '8px 20px'; + + row.appendChild(nameCell); + row.appendChild(amountCell); + row.appendChild(valueCell); + tbody.appendChild(row); + } + } + table.appendChild(thead); + table.appendChild(tbody); + tableContainer.appendChild(table); + + } + + + async function toggleChart() { + isPerTokenView = !isPerTokenView; + const apiUrl = isPerTokenView ? '/api/v1/token' : '/api/v1/vault'; + const data = await fetchData(apiUrl); + + if (!data) return; // Exit if data fetch fails + + const chartDataTable = new google.visualization.DataTable(); + chartDataTable.addColumn('string', 'Token'); + chartDataTable.addColumn('number', 'Value'); + chartDataTable.addColumn({ type: 'string', role: 'tooltip', 'p': { 'html': false } }); + chartDataTable.addRows(transformDataForChart(data)); + + resizeAndDraw(chart, chartDataTable, options); + updateText(!isPerTokenView); + populateTable(data); + } + + function resizeAndDraw(chart, chartDataTable, options) { + function resizeChart() { + const width = window.innerWidth * 0.8; + const height = window.innerHeight * 0.5; + + const dynamicOptions = { ...options }; + if (width >= 700) { + dynamicOptions.width = width; + dynamicOptions.height = height; + } + + chart.draw(chartDataTable, dynamicOptions); + } + + resizeChart(); + window.addEventListener('resize', resizeChart); + } + + // Set button event listener + document.getElementById('chart-header').addEventListener('click', toggleChart); + }; + +
View on Coingecko
@@ -189,6 +299,7 @@ +