Position Endpoints

com.oanda.fxtrade.api

Interface Position

public interface Position

A Position represents an aggregation of several open market orders.

getPair

Gets the pair of this position’s open market orders.

FXPair getPair()

getUnrealizedPL

Calculate the current profit of this position, based on the number of units and average price. The aggregate profit of this position’s open market orders (reported in quote currency)

Parameters

currPrice: An FXTick representing the current rate of this market’s pair

double getUnrealizedPL(FXTick currPrice)

Find more information about Position here