-
Notifications
You must be signed in to change notification settings - Fork 1
/
comission.html
executable file
·39 lines (24 loc) · 999 Bytes
/
comission.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
<html>
<script type="text/javascript" src="crypto-js.js"></script>
<script>
var burl = 'https://api.binance.com';
var endPoint = '/sapi/v1/broker/subAccountApi/commission';
var accountID = 1
var extraParams = "subAccountId=" + accountID + "&makerCommission=0.4&takerCommission=0.4&"
var dataQueryString = extraParams + "recvWindow=20000×tamp=" + Date.now();
var keys = {
'akey': '',
'skey': ''
}
var signature = CryptoJS.HmacSHA256(dataQueryString, keys['skey']).toString(CryptoJS.enc.Hex);
var ourRequest = new XMLHttpRequest();
var url = burl + endPoint + '?' + dataQueryString + '&signature=' + signature;
var ourRequest = new XMLHttpRequest();
ourRequest.open('POST', url, true);
ourRequest.setRequestHeader('X-MBX-APIKEY', keys['akey']);
ourRequest.onload = function () {
console.log(ourRequest.responseText);
}
ourRequest.send();
</script>
</html>