@@ -30,8 +30,10 @@ class Position:
3030 """
3131 SYMBOL string Pair (tBTCUSD, …).
3232 STATUS string Status (ACTIVE, CLOSED).
33- ±AMOUNT float Size of the position. A positive value indicates a long position; a negative value indicates a short position.
34- BASE_PRICE float Base price of the position. (Average traded price of the previous orders of the position)
33+ ±AMOUNT float Size of the position. A positive value indicates a
34+ long position; a negative value indicates a short position.
35+ BASE_PRICE float Base price of the position. (Average traded price
36+ of the previous orders of the position)
3537 MARGIN_FUNDING float The amount of funding being used for this position.
3638 MARGIN_FUNDING_TYPE int 0 for daily, 1 for term.
3739 PL float Profit & Loss
@@ -41,14 +43,15 @@ class Position:
4143 POSITION_ID int64 Position ID
4244 MTS_CREATE int Millisecond timestamp of creation
4345 MTS_UPDATE int Millisecond timestamp of update
44- TYPE int Identifies the type of position, 0 = Margin position, 1 = Derivatives position
46+ TYPE int Identifies the type of position, 0 = Margin position,
47+ 1 = Derivatives position
4548 COLLATERAL float The amount of collateral applied to the open position
4649 COLLATERAL_MIN float The minimum amount of collateral required for the position
4750 META json string Additional meta information about the position
4851 """
4952
5053 def __init__ (self , symbol , status , amount , b_price , m_funding , m_funding_type ,
51- profit_loss , profit_loss_perc , l_price , lev , id , mts_create , mts_update ,
54+ profit_loss , profit_loss_perc , l_price , lev , pid , mts_create , mts_update ,
5255 p_type , collateral , collateral_min , meta ):
5356 self .symbol = symbol
5457 self .status = status
@@ -60,7 +63,7 @@ def __init__(self, symbol, status, amount, b_price, m_funding, m_funding_type,
6063 self .profit_loss_percentage = profit_loss_perc
6164 self .liquidation_price = l_price
6265 self .leverage = lev
63- self .id = id
66+ self .id = pid
6467 self .mts_create = mts_create
6568 self .mts_update = mts_update
6669 self .type = p_type
0 commit comments