-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_history.php
33 lines (26 loc) · 935 Bytes
/
check_history.php
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<?php
require 'vendor/autoload.php';
require 'environment.php';
require 'functions.php';
// GMT / UTC Times
$starttime = $_REQUEST["starttime"];
$endtime = $_REQUEST["endtime"];
$pair = $_REQUEST["pair"];
$timestamp = round(microtime(true)*1000);
$dif = strtotime($endtime)-strtotime($starttime);
echo 'Time,Price,BTC Volume,'.$pair.' Volume<br>';
for ($j=0; $j<$dif; $j++){
$json = trade_history($pair, (strtotime($starttime)+$j)*1000, (strtotime($starttime)+1+$j)*1000);
for ($i=0; $i<sizeof($json); $i++) {
echo date('H:i:s.v', $json[$i]['T']/1000).",".$json[$i]['p'].','.$json[$i]['p']*$json[$i]['q'].','.$json[$i]['q'].'<br>';
}
}
?>
</body>
</html>