TABLE OF CONTENTS


Field name (REST)

Field tag (WS)


Possible values

Description

msgType

35

M

D


account

1

M

ulong


positionId

1

M

ulong


transactTime

60

M

timestamp

Timestamp of the last update

symbol

55

M

string


positionOpenTime

1805

M

timestamp


avgPx

6

M

decimal

Position open price

volume

53

M

decimal


side

54

M

Side


settlDate

64

C

timestamp

Position close date and time

settlPrice

730

C

decimal

Position close price

priorSettlPrice

734

M

decimal

Price of the last clearing (used as base for unrealized P&L and variation margin calculation)

previousClearingBusinessDate

1084

C

timestamp

Timestamp of the last clearing

clearingBusinessDate

715

M

timestamp

Timestamp of the next clearing

marginAmounts

1643

C

Array of MarginAmount

For open positions: current margin requirements

payments

40212

M

Array of Payment

Commissions, realized P&L, interest payments

relatedTrades

1855

M

Array of RelatedTrade



Payment

Field name (REST)

Field tag (WS)


Possible values

Description

paymentType

40213

M

40 — Commission (total fees associated with the position; rebates are not included)

41 — Interest (total interest paid or received, includes all types of interest, i.e. interest, premium, risk adjustment)

42 — Settlement (realized P&L / settled variation margin)

paymentCurrency

40216

M

string


paymentAmount

40217

M

decimal



RelatedTrade

Field name (REST)

Field tag (WS)


Possible values

Description

relatedTradeId

1856

M

string


relatedTradeType

1857

M

1 — Open (OpenExecId)

2 — Close (CloseExecId)

3 — ParentPosition (ParentPositionId)


Samples

WS

REST

{
"35":"AP",
"1":1012838720,
"2618":131783919,
"60":1597419237947996851,
"55":"XBTUSD",
"1805":1597418912238380729,
"6":"11708.23",
"53":"1",
"54":"1",
"734":"11708.23",
"1643":[
{
"1645":"0.00000428",
"1644":"11",
"1646":"BTC"
},
{
"1645":"0.00000107",
"1644":"7",
"1646":"BTC"
}
],
"40212":[
{
"40213":"40",
"40216":"BTC",
"40217":"0.00000004"
},
{
"40213":"42",
"40216":"BTC",
"40217":"0"
},
{
"40213":"41",
"40216":"BTC",
"40217":"0"
}
],
"1855":[
{
"1856":"49bcb181eb00702892e43c88b2f78e7769b206c5",
"1857":"1"
}


{
"msgType":"AP",
"account":1012838720,
"positionId":131609614,
"transactTime":1593789636098195062,
"symbol":"XBTUSD",
"positionOpenTime":1593781122140553232,
"avgPx":"9107.47",
"volume":"1",
"side":"1",
"priorSettlPrice":"9086.4",
"marginAmounts":[
{
"marginAmt":"0.00000551",
"marginAmtType":"11",
"marginAmtCcy":"BTC"
},
{
"marginAmt":"0.00000138",
"marginAmtType":"7",
"marginAmtCcy":"BTC"
}
],
"payments":[
{
"paymentType":"40",
"paymentCurrency":"BTC",
"paymentAmount":"0.00000005"
},
{
"paymentType":"42",
"paymentCurrency":"BTC",
"paymentAmount":"-0.00000025"
},
{
"paymentType":"41",
"paymentCurrency":"BTC",
"paymentAmount":"-0.00000002"
}
],
"relatedTrades":[
{
"relatedTradeId":"7176f67b5db9bbec78017f8e1d66bdd452877361",
"relatedTradeType":"1"
}