Exemplo n.º 1
0
        echo '<h3>' . $cart_itm["name"] . '</h3>';
        echo '<div class="p-code">P code : ' . $cart_itm["code"] . '</div>';
        echo '<div class="p-qty">Qty : ' . $cart_itm["qty"] . '</div>';
        echo '<div class="p-price">Price :' . $currency . $cart_itm["price"] . '</div>';
        echo '</li>';
        $subtotal = $cart_itm["price"] * $cart_itm["qty"];
        $total = $total + $subtotal;
    }
    echo '</ol>';
    echo '<span class="check-out-txt"><strong>Total : ' . $currency . $total . '</strong> <a href="view_cart.php">Check-out!</a></span>';
    echo '<span class="empty-cart"><a href="cart_update.php?emptycart=1&return_url=' . $current_url . '">Empty Cart</a></span>';
} else {
    echo 'Your Cart is empty';
}
$exchange = new poloniex("apikey", "apisecret");
$ordersLC = $exchange->get_trade_history("BTC_LC");
$ordersLCL = $exchange->get_trade_history("BTC_LCL");
//print_r($orders);
//print_r($orders[0]);
//print_r($orders[0]["date"]);
//print_r($orders[0]["type"]);
//print_r($orders[0]["rate"]);
//print_r($orders[0]["amount"]);
//print_r($orders[0]["total"]);
//echo $orders[0]["rate"];
$rateLC = print_r($ordersLC[0]["rate"], true);
$rateLCL = print_r($ordersLCL[0]["rate"], true);
$url = "https://btc-e.com/api/3/ticker/btc_usd";
$send_curl = curl_init($url);
curl_setopt($send_curl, CURLOPT_RETURNTRANSFER, TRUE);
$json_response = curl_exec($send_curl);
Exemplo n.º 2
0
									<ul class="dropdown-menu dropdown-light pull-right" role="menu">
										<li><a class="panel-collapse collapses" href="#"><i class="fa fa-angle-up"></i> <span>Collapse</span> </a></li>
										<li><a class="panel-refresh" href="#"><i class="fa fa-refresh"></i> <span>Refresh</span></a></li>
										<li><a class="panel-config" href="#panel-config" data-toggle="modal"><i class="fa fa-wrench"></i> <span>Configurations</span></a></li>
										<li><a class="panel-expand" href="#"><i class="fa fa-expand"></i> <span>Fullscreen</span></a></li>
									</ul>
								</div>
								<a class="btn btn-xs btn-link panel-close" href="#"><i class="fa fa-times"></i></a>
							</div>
						</div>
						<div class="panel-body">
							<div class=" panel-scroll height-250"> 
								<div class="table-responsive">
									<?php 
$pair = 'BTC_XMR';
$alltrade_history = $poloniex->get_trade_history($pair);
?>
									<table class="table table-striped table-hover" id="sample_2">
										<thead>
											<tr>
												<th>Date</th>
												<th>Type</th>
												<th>Price(BTC)</th>
												<th>Amount(XMR)</th>
												<th>Total(BTC)</th>
											</tr>
										</thead>
										<tbody>
											<?php 
foreach ($alltrade_history as $row) {
    ?>