-
Notifications
You must be signed in to change notification settings - Fork 0
/
frame11.html
108 lines (102 loc) · 6.81 KB
/
frame11.html
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
100
101
102
103
104
105
106
107
108
<head>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#171717">
<title>
CryptoPrices
</title>
</head>
<style>
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&display=swap');
.Divbuttonback:hover {
box-shadow: 0px 4px 4px rgba(0, 0, 0, 1) inset
}
.Name {
color: rgba(235,0,41, 1);
}
</style>
<body style="margin: 0; display: flex; justify-content: center; align-items: center; height: 100%; width: 100%; background: #171717; color: #FFF; font-family: 'IBM Plex Mono', monospace;">
<script>
let URLId = 'tron'
let status = false;
fetch('https://api.coincap.io/v2/assets/' + URLId)
.then(response => response.json())
.then(data => {
const DataData = data.data;
console.log(symbolname)
function displayData() {
document.getElementById('Price').innerText = parseFloat(DataData.priceUsd).toFixed(2);
document.getElementById('MarketCap').innerText = 'Market Cap: ' + parseFloat(DataData.marketCapUsd).toFixed(2);
document.getElementById('Volume').innerText = 'Volume 24H: ' + parseFloat(DataData.volumeUsd24Hr).toFixed(2);
document.getElementById('Symbol').innerText = 'Symbol: ' + DataData.symbol;
document.getElementById('Rank').innerText = 'Rank: ' + DataData.rank;
document.getElementById('Name').innerText = '' + DataData.name;
}
displayData();
})
.catch(error => {
document.getElementById('Price').innerText = "Error!"
});
</script>
<div id="Group2" style="width: 1000.32px; height: 711px; position: relative">
<div id="CreatedByServer2003userDataFromCoincapApiGraphDataByTradingview" style="width: 462px; height: 28px; left: 269px; top: 700px; position: absolute; color: rgba(255, 255, 255, 0.30); font-size: 10px; font-family: IBM Plex Mono; font-weight: 500; word-wrap: break-word">Created by server2003user | Data from CoinCap API | Graph Data by TradingView</div>
<div id="DivRectangle2" style="width: 1000px; height: 600px; left: 0px; top: 39px; position: absolute; background: rgba(0, 0, 0, 0.25); box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) inset; border-radius: 3px"></div>
<div id="DivRectangle3" style="width: 966px; height: 465px; left: 17px; top: 162px; position: absolute; background: rgba(0, 0, 0, 0.25); box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) inset; border-radius: 3px"></div>
<div id="DivRectangle4" style="width: 943px; height: 442px; left: 28px; top: 174px; position: absolute;">
<div class="tradingview-widget-container">
<div id="tradingview_35619"></div>
<div class="tradingview-widget-copyright"><a href="https://www.tradingview.com/" rel="noopener nofollow" target="_blank"><span class="blue-text">Track all markets on TradingView</span></a></div>
<script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
<script type="text/javascript">
let symbolname;
function TradingViewWidget(symame) {
new TradingView.widget(
{
"width": "943",
"height": "442",
"symbol": symame,
"interval": "D",
"timezone": "Etc/UTC",
"theme": "dark",
"style": "2",
"locale": "en",
"enable_publishing": false,
"backgroundColor": "rgba(0, 0, 0, 1)",
"gridColor": "rgba(66, 66, 66, 1)",
"allow_symbol_change": false,
"container_id": "tradingview_35619"
});
}
fetch('https://api.coincap.io/v2/assets/' + URLId)
.then(response => response.json())
.then(data => {
symbolname = data.data.symbol + 'USD';
TradingViewWidget(symbolname)
})
.catch(error => {
console.log("Error!");
});
</script>
</div>
</div>
<div id="DivRectangle5" style="width: 157px; height: 41px; left: 17px; top: 109px; position: absolute; background: rgba(0, 0, 0, 0.25); box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) inset; border-radius: 3px"></div>
<div id="DivRectangle6" style="width: 157px; height: 41px; left: 190px; top: 109px; position: absolute; background: rgba(0, 0, 0, 0.25); box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) inset; border-radius: 3px"></div>
<div id="DivRectangle7" style="width: 300px; height: 41px; left: 363px; top: 109px; position: absolute; background: rgba(0, 0, 0, 0.25); box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) inset; border-radius: 3px"></div>
<div id="DivRectangle8" style="width: 304px; height: 41px; left: 679px; top: 109px; position: absolute; background: rgba(0, 0, 0, 0.25); box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) inset; border-radius: 3px"></div>
<div id="Name" class="Name" style="width: 104.33px; height: 27px; left: 0px; top: 0px; position: absolute; font-size: 20px; font-family: IBM Plex Mono; font-weight: 400; word-wrap: break-word"></div>
<div id="Volume" style="width: 297.32px; height: 19px; left: 703px; top: 120px; position: absolute; color: white; font-size: 15px; font-family: IBM Plex Mono; font-weight: 400; word-wrap: break-word">Volume 24H:</div>
<div id="MarketCap" style="width: 243.39px; height: 19px; left: 392px; top: 120px; position: absolute; color: white; font-size: 15px; font-family: IBM Plex Mono; font-weight: 400; word-wrap: break-word">Market Cap:</div>
<div id="Symbol" style="width: 99.35px; height: 19px; left: 219px; top: 120px; position: absolute; color: white; font-size: 15px; font-family: IBM Plex Mono; font-weight: 400; word-wrap: break-word">Symbol:</div>
<div id="Rank" style="width: 93.39px; height: 19px; left: 64px; top: 120px; position: absolute; color: white; font-size: 15px; font-family: IBM Plex Mono; font-weight: 400; word-wrap: break-word">Rank:</div>
<div id="Price" style="width: 192.35px; height: 52px; left: 17px; top: 50px; position: absolute; color: white; font-size: 40px; font-family: IBM Plex Mono; font-weight: 400; word-wrap: break-word"></div>
<div class="DivButtonback" style="width: 144px; height: 31px; left: 428px; top: 652px; position: absolute" onclick="window.location='frame1.html';">
<div class="Back" style="width: 48.35px; height: 27px; left: 8px; top: 2px; position: absolute; color: white; font-size: 20px; font-family: IBM Plex Mono; font-weight: 400; word-wrap: break-word">Back</div>
<div class="DivRectangle1" style="width: 144px; height: 31px; left: 0px; top: 0px; position: absolute; background: rgba(255, 255, 255, 0.30); box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); border-radius: 3px"></div>
</div>
</div>
</div>
</body>