forked from reednaa/AMMroi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbancor.html
More file actions
161 lines (149 loc) · 7.26 KB
/
bancor.html
File metadata and controls
161 lines (149 loc) · 7.26 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css">
<title>Bancor pool information</title>
<script defer src="https://use.fontawesome.com/releases/v5.14.0/js/all.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"
integrity="sha512-qTXRIMyZIFb8iQcfjXWCO8+M5Tbc38Qi5WzdPOYZHIlZpzBHG3L3by84BBBOiRGiEb7KKtAOAs5qYdUiZiQNNQ=="
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"
integrity="sha256-t9UJPrESBeG2ojKTIcFLPGF7nHi2vEc7f5A2KpH/UBU=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.css"
integrity="sha256-aa0xaJgmK/X74WM224KMQeNQC2xYKwlAt08oZqjeF0E=" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<script src="https://cdn.jsdelivr.net/npm/papaparse@5.3.0/papaparse.min.js"
integrity="sha256-Xjq9HM9n3XzT47n/NmSEaJUwPi7hme++D8mxHfSr+0Q=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-crosshair@1.1.6/dist/chartjs-plugin-crosshair.min.js"
integrity="sha256-r/9biws8g6l28IaMAzQW4jw/wTmuDPmcEaXn1qqD9iM=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
<script src="https://cdn.jsdelivr.net/npm/flatpickr@4.6.6/dist/flatpickr.min.js"
integrity="sha256-BSZ2gjTJLE5ZEGH1e6beyHYNOITz6M26XFre9lEBdx8=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/flatpickr@4.6.6/dist/l10n/da.js"
integrity="sha256-btg10M6OuilEf55qRv0f370emD4TckUGmmEm03YaJtE=" crossorigin="anonymous"></script>
<style>
@keyframes shake {
10%,
90% {
transform: translate3d(-1px, 0, 0);
}
20%,
80% {
transform: translate3d(2px, 0, 0);
}
30%,
50%,
70% {
transform: translate3d(-4px, 0, 0);
}
40%,
60% {
transform: translate3d(4px, 0, 0);
}
}
.is-shake {
animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
</style>
</head>
<body>
<div id="structure">
<section class="hero is-info is-bold">
<div class="hero-body">
<div class="container">
<h1 class="title">
Bancor
</h1>
<h2 class="subtitle">
<div class="field has-addons">
<div class="control">
<div class="select">
<select v-model="selectedAsset">
<option value="false">Select Asset</option>
<option :value="pool" v-for="pool in listOfTokens">
{{pool}}
</option>
</select>
</div>
</div>
<div class="control">
<input id="startDate" class="input" v-model="selectedDate" type="date" />
</div>
</div>
<div class="control">
<button class="button" @click="addChart()"
:class="{'is-sucess': selectedAsset, 'is-danger': !selectedAsset, 'is-shake': isShake}">Add
Chart</button>
</div>
<div class="control">
<label class="checkbox">
<input type="checkbox" v-model="showProtected">
Show without impermanent loss
</label>
</div>
<div class="control">
<label class="checkbox">
<input type="checkbox" v-model="bancorProtected">
Bancor impermanent loss protected
</label>
</div>
</h2>
</div>
</div>
</section>
<section class="section">
<div class="columns is-multiline">
<div class="column is-half" v-for="card, index in charts">
<div class="card">
<header class="card-header">
<p class="card-header-title">
{{card.name}}
</p>
<a :href="'?' + card.token + '=' + card.start_index" class="card-header-icon">
<span class="icon">
<i class="fas fa-link"></i>
</span>
</a>
</header>
<div class="card-content">
<canvas :id="card.id" width="100" height="100"></canvas>
</div>
<!-- <footer class="card-footer">
<a href="#" class="card-footer-item">Save</a>
<a href="#" class="card-footer-item">Edit</a>
<a href="#" class="card-footer-item">Delete</a>
</footer> -->
</div>
</div>
</div>
<!-- <div class="container">
<canvas id="mainChart" width="100" height="100"></canvas>
</div> -->
</section>
<div class="container">
<div class="notification" v-if="help">
<button @click="help = false" class="delete"></button>
When using the default date, the picker might select a dataset that includes an early datapoint. The first datapoints' price might be outliers, since the market have yet to settle on a token price.
I advise using the datetime picker. It will pick the first datapoint after the selected date and TIME.
<template v-if="selectedAsset">
<br>
<a :href="'/data/bancor/roi/' + selectedAsset + '.parsed.csv'"> {{'/data/bancor/roi/' + selectedAsset + '.parsed.csv'}}</a> or
<a :href="'https://github.com/Lindgrenium/AMMroi/blob/gh-pages/data/bancor/roi/' + selectedAsset + '.parsed.csv'">
<span class="icon">
<i class="fas fa-table"></i>
</span>
</a> (Resolution ~6 hours)
</template>
</div>
</div>
</div>
<a href="http://github.com/Lindgrenium/AMMroi">
<span class="icon">
<i class="fab fa-github"></i>
</span>
</a>
</body>
<script src="js/bnt.js?v=8"></script>
</html>