ATrade dashboard
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

33 lines
1.1 KiB

{% extends "dashboard/base.html" %}
{% load mathfilters %}
{% block content %}
<table class="table table-condensed">
<tr>
<td>Time</td>
<td>Account</td>
<td>Security</td>
<td>Operation</td>
<td>Price</td>
<td>Quantity</td>
<td>Volume</td>
<td>Strategy ID</td>
<td>Signal ID</td>
<td></td>
</tr>
{% for trade in trades %}
<tr>
<td>{{ trade.timestamp }}</td>
<td>{{ trade.account }}</td>
<td>{{ trade.security }}</td>
<td>{% if trade.quantity > 0 %} Buy {% else %} Sell {% endif %}</td>
<td>{{ trade.price }}</td>
<td>{{ trade.quantity|abs }}</td>
<td>{{ trade.volume|stringformat:".3f"}} {{ trade.volumeCurrency }}</td>
<td>{{ trade.strategyId }}</td>
<td>{{ trade.signalId }}</td>
<td><button type="button" class="btn btn-danger" onclick="if(window.confirm('Confirm deletion')) { document.location.href = '/delete_trade?id={{ trade.pk }}'}; return false;">Delete</button></td>
</tr>
{% endfor %}
</table>
{% endblock %}