Confirmation of win or loss on Sprint Trade

2 posts / 0 new
Last post
Confirmation of win or loss on Sprint Trade

After a sprint trade has closed, is there any easy way to get the open, close and profit (given I know the deal ref and deal id)? I'm not receiving this through the stream service, and alternatively getting account history from the REST service and enumerating the trades to find the one we want seems cumbersome. Have I missed something?

Unfortunately not. You can

Unfortunately not. You can calculate it by comparing the level, direction, size and payoutAmount of the opening and closing OPUs.

For example:

Opening OPU: {status: 'OPEN', level: 1.23456, direction: 'BUY', size: 25, payoutAmount: 45.25}
Closing OPU: {status: 'DELETED', level: 1.23457}

Profit = 45.25 - 25

Log in or register to post comments