diff --git a/main.py b/main.py index 4995037..e1de0b1 100755 --- a/main.py +++ b/main.py @@ -88,6 +88,7 @@ def on_new_tick(event: Event, status: SymbolStatus): def pos_to_json(pw: PositionWrapper): return { "id": pw.position.id, + "amount": pw.position.amount, "base_price": pw.position.base_price, "state": str(pw.state()), "symbol": pw.position.symbol, diff --git a/websrc/components/Tables.tsx b/websrc/components/Tables.tsx index c4b9640..c623e4b 100644 --- a/websrc/components/Tables.tsx +++ b/websrc/components/Tables.tsx @@ -4,15 +4,6 @@ import {NewTickData, PositionState, socket} from '../'; export class PositionTable extends Component<{}, { positions: Array }> { - testPosition: PositionState = { - base_price: 1, - id: 1, - profit_loss: 1000, - profit_loss_percentage: 1000, - state: "loss", - symbol: "PAPARCOIN" - } - state = { positions: [] } @@ -59,6 +50,7 @@ export class PositionTable extends Component<{}, { positions: Array{position.state} {position.symbol} {position.base_price.toFixed(2)} + {position.amount.toFixed(5)} {position.profit_loss.toFixed(2)} {position.profit_loss_percentage.toFixed(2)} %