Average Entry Price - Options


The average entry price is always different to the close price or the price at which you buy the option. Is there a way i can calculate that average entry price or fetch it from the API as it is clearly very important. Thanks