I'm building an app and one of it's features will be the calculation of profit and loss. I want this to be applicable to most major market indexes from equities, to futures to currencies, etc. So, is there some sort of API that I can use that would import the data and when a user enters the entry and exit price, it calculates their P&L? Without me having to manually key in every tick value per instrument.
