-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Coinbase balance and outstanding order balances to orders page
This change adds a simple table to the orders page the displays 1) your current BTC balance on Coinbase, 2) the total of sell orders you have outstanding, 3) the difference between 1 and 2, 4) the total of buy orders you have outstanding. The Coinbase balance incurs an API request to Coinbase, but it is unlikely to change frequently, so it is a good candidate for caching. Test Plan: Login and visit /homepage/orders You should see a table with the 4 pieces of information described above.
- Loading branch information
MattFaus
committed
Feb 27, 2014
1 parent
1d08b82
commit 40c3475
Showing
5 changed files
with
79 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,32 @@ | ||
{block head} | ||
<link rel="stylesheet" media="screen,projection,tv" href="{$basePath}/css/orders.css" /> | ||
{/block} | ||
|
||
{block content} | ||
<h1>Orders</h1> | ||
|
||
<table class="balances table table-bordered"> | ||
<tr> | ||
<td class="title">Coinbase Balance</td> | ||
<td class="amount">{$btc_balance} BTC</td> | ||
</tr> | ||
<tr> | ||
<td class="title">Sell orders</td> | ||
<td class="amount">{$btc_sell_total} BTC</td> | ||
</tr> | ||
<tr> | ||
<td class="title">Available Balance</td> | ||
<td class="amount">{$btc_available} BTC</td> | ||
</tr> | ||
<tr> | ||
<td class="title">Buy orders</td> | ||
<td class="amount">{$btc_buy_total} BTC</td> | ||
</tr> | ||
</table> | ||
|
||
<a n:href="newOrder" class="btn btn-success btn-large"><i class="icon-white icon-plus"></i> Place new order</a> | ||
|
||
{widget OrdersGrid} | ||
|
||
<p>Price on Coinbase is checked about every second against your orders. Last check on {$latestPrice['buy']->updated} PST</p> | ||
<p>Price on Coinbase is checked about every second against your orders. Last check on {$latestPrice['buy']->updated} PST</p> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
table.balances { | ||
width: 450px; | ||
} | ||
|
||
td.title { | ||
font-weight: bold; | ||
} | ||
|
||
td.amount { | ||
text-align: right; | ||
font-family: 'Courier New', monospace; | ||
} | ||
|
||
h1 { | ||
padding-bottom: 5px; | ||
} |