-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-table.js
44 lines (30 loc) · 875 Bytes
/
build-table.js
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
$(document).ready(function () {
var apikey = "&CMC_PRO_API_KEY=6f8eb99f-1de9-4566-ae06-b423c3d9fe15"
var cmcURL = "https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?"
var URL = cmcURL + "convert=EUR&symbol=BTC,BCH,LTC,XMR,ETH&" + apikey
console.log(URL)
// Request data from Coinmarketcap
var request = new XMLHttpRequest()
request.open('GET', URL, true)
request.onload = function () {
// Begin accessing JSON data here
var data = JSON.parse(this.response);
console.log(data);
console.log("hi")
}
request.send()
$('#cryptotable').bootstrapTable({
data: [
{
'coin': 'a',
'hold': 'a',
'coins_initial': 'a',
'coins_current': 'a',
'wallet_initial': 'a',
'wallet_current': 'a',
'return_net': 'a',
'return_rate': 'a'
}
]
})
})