You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
the getOpenPositions for coin based positions will display in the notional amoutns i.e. number of contracts * multiplier but for the usdt based positions it will display contracts.
I suggest we always display contract position by changing this
public static OpenPositions adaptOpenPositions(OkexResponse<List<OkexPosition>> positions, ExchangeMetaData exchangeMetaData) {
List<OpenPosition> openPositions = new ArrayList<>();
positions.getData().forEach(okexPosition -> openPositions.add(
new OpenPosition.Builder().instrument(adaptOkexInstrumentId(okexPosition.getInstrumentId()))
.liquidationPrice(okexPosition.getLiquidationPrice()).price(okexPosition.getAverageOpenPrice()).type(adaptOpenPositionType(okexPosition))
.size(okexPosition.getPosition().abs()
.multiply(exchangeMetaData.getInstruments().get(adaptOkexInstrumentId(okexPosition.getInstrumentId())).getContractValue()))
.unRealisedPnl(okexPosition.getUnrealizedPnL()).build()));
return new OpenPositions(openPositions);
}
to
public static OpenPositions adaptOpenPositions(OkexResponse<List<OkexPosition>> positions, ExchangeMetaData exchangeMetaData) {
List<OpenPosition> openPositions = new ArrayList<>();
positions.getData().forEach(okexPosition -> openPositions.add(
new OpenPosition.Builder().instrument(adaptOkexInstrumentId(okexPosition.getInstrumentId()))
.liquidationPrice(okexPosition.getLiquidationPrice()).price(okexPosition.getAverageOpenPrice()).type(adaptOpenPositionType(okexPosition))
.size(okexPosition.getPosition())
.unRealisedPnl(okexPosition.getUnrealizedPnL()).build()));
return new OpenPositions(openPositions);
}}
The text was updated successfully, but these errors were encountered:
Hi,
the getOpenPositions for coin based positions will display in the notional amoutns i.e. number of contracts * multiplier but for the usdt based positions it will display contracts.
I suggest we always display contract position by changing this
to
The text was updated successfully, but these errors were encountered: