Skip to content

Commit 89d0fa9

Browse files
committed
fix portfolio um position risk fields
1 parent 7e635e5 commit 89d0fa9

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

exchange/portfolio/um/model.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,22 @@ func (a *PositionList) Row() [][]any {
5252
type PositionRiskList []*portfolio.UMPosition
5353

5454
func (a *PositionRiskList) Header() []string {
55-
return []string{"Symbol", "Position Amont", "Entry Price", "Unrealized Profit", "Liquidation Price", "Leverage", "Max Notional", "Position Side", "Notional", "Update Time"}
55+
return []string{"Symbol", "Position Side", "Position Amont", "Entry Price", "Unrealized Profit", "Liquidation Price", "Leverage", "Notional", "Max Notional", "Update Time"}
5656
}
5757

5858
func (a *PositionRiskList) Row() [][]any {
5959
rows := [][]any{}
6060
for _, position := range *a {
6161
rows = append(rows, []any{
6262
position.Symbol,
63+
position.PositionSide,
6364
position.PositionAmt,
6465
position.EntryPrice,
6566
position.UnrealizedProfit,
6667
position.LiquidationPrice,
6768
position.Leverage,
68-
position.MaxNotional,
69-
position.MaxNotionalValue,
70-
position.PositionSide,
7169
position.Notional,
70+
position.MaxNotionalValue,
7271
time.UnixMilli(position.UpdateTime).Format("2006-01-02 15:04:05"),
7372
})
7473
}
@@ -92,7 +91,7 @@ func (i *IncomeHistoryList) Row() [][]any {
9291
type OrderList []portfolio.UMAllOrdersResponse
9392

9493
func (a *OrderList) Header() []string {
95-
return []string{"Order ID", "Symbol", "Side", "Status", "Price", "Quantity", "Executed Quantity", "Time", "Update Time"}
94+
return []string{"Order ID", "Symbol", "Side", "Type", "Status", "Price", "Quantity", "Executed Quantity", "Time", "Update Time"}
9695
}
9796

9897
func (a *OrderList) Row() [][]any {
@@ -102,6 +101,7 @@ func (a *OrderList) Row() [][]any {
102101
order.OrderID,
103102
order.Symbol,
104103
order.Side,
104+
order.Type,
105105
order.Status,
106106
order.Price,
107107
order.OrigQty,

0 commit comments

Comments
 (0)