Compare commits

...

2 Commits

3 changed files with 20 additions and 3 deletions

View File

@ -602,6 +602,20 @@ class TradeDetails(BaseModel):
TradeDetailsSchema = {
"trade": "trade",
"id": "trade.id",
"symbol": "trade.instrument",
"price": "trade.price",
"openTime": "trade.openTime",
"initialUnits": "trade.initialUnits",
"initialMarginRequired": "trade.initialMarginRequired",
"state": "trade.state",
"currentUnits": "trade.currentUnits",
"realizedPL": "trade.realizedPL",
"closingTransactionIDs": "trade.closingTransactionIDs",
"financing": "trade.financing",
"dividendAdjustment": "trade.dividendAdjustment",
"closeTime": "trade.closeTime",
"averageClosePrice": "trade.averageClosePrice",
"clientExtensions": "trade.clientExtensions",
"lastTransactionID": "lastTransactionID",
}

View File

@ -29,7 +29,7 @@
</thead>
<tbody>
{% for key, item in db_info.items %}
{% if key == 'instruments' %}
{% if key == 'response' %}
<tr>
<th>{{ key }}</th>
<td>

View File

@ -50,12 +50,15 @@ class TradeAction(LoginRequiredMixin, OTPRequiredMixin, View):
if type == "page":
type = "modal"
db_info = db_info.__dict__
del db_info["_state"]
del db_info["_original"]
context = {
"title": f"Trade info ({type})",
"unique": unique,
"window_content": self.window_content,
"type": type,
"db_info": db_info.__dict__,
"db_info": db_info,
"live_info": live_info,
}