-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEthereum.html
40 lines (35 loc) · 1.35 KB
/
Ethereum.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Fetch and Graph CSV</title>
<script>
var api = 'https://api.finage.co.uk/last/crypto/detailed/';
var crypt = 'usd';
var apiKey = '?apikey=API_KEY496Z0N8OYN5ZBXGZRIAHPUZNSSX837FB';
var input = 'eth';
var url = api + input + crypt + apiKey;
var a, b;
async function getISS() {
const response = await fetch(url);
const data = await response.json();
const {yearLow, yearHigh} = data;
document.getElementById('low').textContent = yearLow.toFixed(2);
document.getElementById('high').textContent = yearHigh.toFixed(2);
}
getISS();
</script>
</head>
<body>
<h1>Ethereum</h1>
<p> Year low: <span id="low"></span> USD<br/><br/>
Year High: <span id="high"></span> USD
</p>
<iframe src="Interest.html" height="100" width="400" title="Iframe Example" style="border:none;"></iframe>
<p>
<iframe src="graph.html" height="400" width="400" title="Iframe Example" style="border:none;">
</iframe>
</body>
</html>