forked from gateio/gateapi-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_position.go
55 lines (53 loc) · 1.99 KB
/
model_position.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Gate API v4
*
* APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf.
*
* Contact: support@mail.gate.io
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package gateapi
// Futures position details
type Position struct {
// User ID
User int64 `json:"user,omitempty"`
// Futures contract
Contract string `json:"contract,omitempty"`
// Position size
Size int64 `json:"size,omitempty"`
// Position leverage. 0 means cross margin; positive number means isolated margin
Leverage string `json:"leverage,omitempty"`
// Position risk limit
RiskLimit string `json:"risk_limit,omitempty"`
// Maximum leverage under current risk limit
LeverageMax string `json:"leverage_max,omitempty"`
// Maintenance rate under current risk limit
MaintenanceRate string `json:"maintenance_rate,omitempty"`
// Position value calculated in settlement currency
Value string `json:"value,omitempty"`
// Position margin
Margin string `json:"margin,omitempty"`
// Entry price
EntryPrice string `json:"entry_price,omitempty"`
// Liquidation price
LiqPrice string `json:"liq_price,omitempty"`
// Current mark price
MarkPrice string `json:"mark_price,omitempty"`
// Unrealized PNL
UnrealisedPnl string `json:"unrealised_pnl,omitempty"`
// Realized PNL
RealisedPnl string `json:"realised_pnl,omitempty"`
// History realized PNL
HistoryPnl string `json:"history_pnl,omitempty"`
// PNL of last position close
LastClosePnl string `json:"last_close_pnl,omitempty"`
// Realized POINT PNL
RealisedPoint string `json:"realised_point,omitempty"`
// History realized POINT PNL
HistoryPoint string `json:"history_point,omitempty"`
// ADL ranking, range from 1 to 5
AdlRanking int32 `json:"adl_ranking,omitempty"`
// Current open orders
PendingOrders int32 `json:"pending_orders,omitempty"`
CloseOrder PositionCloseOrder `json:"close_order,omitempty"`
}