Under Sri Lanka's rules even banks have strict rules of overnight foreign exchange positions and only exporters can keep dollars.
"CPC has been given permission to buy dollars and have a foreign currency account because they have large import bills to meet," the Central Bank's chief economist P N Weerasinghe said.
"There is no specific limit to the amount they can buy."
Weerasinghe said a credit line from Iran had become operative in March where CPC could import oil and pay up to six months later on a rolling basis.
CPC had said it had a deal with Iran to buy up to seven months of crude on easy payment terms with the first four months being interest free. The balance three months attracts an interest rate of London Interbank Offered Rate plus 50 basis points.
CPC imports about 90 million US dollars worth of crude a month.
The credit line gives a chance for the utility to sell refined petroleum for cash and buy dollars.
Until recently forward premiums in Sri Lanka were very high due to high domestic interest rates, as forward premiums are usually the net difference between interest rates of the foreign currency and the rupee.
But this year forward dollar premiums have fallen as exporters sold dollars forward and local dollars became more expensive.
If the CPC builds up a dollar position at the expense of settling rupee debt, the holding cost of its dollar portfolio would be higher than the forward premium.
In Sri Lanka it is a commonly held belief that the rupee depreciates because of oil imports.
However economic analysts have pointed out that rupee depreciation is caused by loose monetary policy and if the central bank can stop printing money, Sri Lanka would not have a foreign exchange problem.
Sri Lanka's foreign reserves have shot up to 3.5 billion in the first quarter of this year amid tight monetary policy.
Weerasinghe says the Central Bank had bought 400 million dollars from the markets in the first quarter of this year..