How do I get the price of a line item for the transactions which are already completed? There are some transactions which are made using drupal commerce module along with commerce ccavenue module. I have the order ids, transaction ids and list of line items purchased in each of the orders. But the problem is I if a product price is updated in past then I am not able to find the cost of the product in the past order when the product was purchased. 

Is there any place where drupal stores product price for a particular order anywhere.
Yes, Commerce Module does store product amount of past order... You can retrieve using below details...

To get full details of order

$order = commerce_order_load($order_id);
$view_mode = "administrator";
print entity_view('commerce_order', array($order-&gt;order_id =&gt; $order), $view_mode, NULL, TRUE);


To be more specific

  $order = commerce_order_load($order_id);
  foreach ($order-&gt;commerce_line_items['und'] as $line) {
    $line_item = commerce_line_item_load($line['line_item_id']);
    drupal_set_message("&lt;pre&gt;" . print_r($line_item,1) . "&lt;/pre&gt;");
  }


There is no chance it gets new price instead of old price since it gets tracked in field_data_commerce_unit_price table in database ... All you need to do is divide by 100 if decimal places are 2 in order line item amount...