Fair value measurements - Fair value hierarchy (Details) - USD ($) $ in Thousands | Mar. 31, 2018 | Dec. 31, 2017 |
Assets: | | |
Derivative asset, current | $ 15,442 | $ 6,892 |
Derivative asset, noncurrent | 4,541 | 3,413 |
Liabilities: | | |
Derivative liability, current | (17,628) | (22,950) |
Derivative liability, noncurrent | (325) | (384) |
Recurring | | |
Liabilities: | | |
Net derivative position | 2,030 | (13,029) |
Recurring | Crude Oil | Commodity derivatives | | |
Assets: | | |
Derivative asset, current | 7,295 | 3,706 |
Derivative asset, noncurrent | 8,414 | 5,526 |
Liabilities: | | |
Derivative liability, current | (10,300) | (8,756) |
Derivative liability, noncurrent | 1,361 | 3,698 |
Recurring | Crude Oil | Deferred Premiums | | |
Assets: | | |
Derivative asset, current | (5,930) | (87) |
Derivative asset, noncurrent | (8,001) | (2,113) |
Liabilities: | | |
Derivative liability, current | (12,368) | (18,115) |
Derivative liability, noncurrent | (1,468) | (5,016) |
Recurring | Natural Gas Liquids | Commodity derivatives | | |
Assets: | | |
Derivative asset, current | 101 | 0 |
Derivative asset, noncurrent | 0 | 0 |
Liabilities: | | |
Derivative liability, current | 470 | 0 |
Derivative liability, noncurrent | 0 | 0 |
Recurring | Natural Gas | Commodity derivatives | | |
Assets: | | |
Derivative asset, current | 16,153 | 5,729 |
Derivative asset, noncurrent | 4,128 | 0 |
Liabilities: | | |
Derivative liability, current | 4,918 | 4,817 |
Derivative liability, noncurrent | (218) | 934 |
Recurring | Natural Gas | Deferred Premiums | | |
Assets: | | |
Derivative asset, current | (2,177) | (2,456) |
Derivative asset, noncurrent | 0 | 0 |
Liabilities: | | |
Derivative liability, current | (348) | (896) |
Derivative liability, noncurrent | 0 | 0 |
Recurring | Current Assets | Crude Oil | Commodity derivatives | | |
Assets: | | |
Amounts offset | (6,937) | (3,721) |
Recurring | Current Assets | Crude Oil | Deferred Premiums | | |
Assets: | | |
Amounts offset | (5,930) | (87) |
Recurring | Current Assets | Natural Gas Liquids | Commodity derivatives | | |
Assets: | | |
Amounts offset | (792) | 0 |
Recurring | Current Assets | Natural Gas | Commodity derivatives | | |
Assets: | | |
Amounts offset | (4,918) | (4,817) |
Recurring | Current Assets | Natural Gas | Deferred Premiums | | |
Assets: | | |
Amounts offset | (2,177) | (2,456) |
Recurring | Noncurrent Assets | Crude Oil | Commodity derivatives | | |
Assets: | | |
Amounts offset | (5,581) | (6,087) |
Recurring | Noncurrent Assets | Crude Oil | Deferred Premiums | | |
Assets: | | |
Amounts offset | (8,001) | (2,113) |
Recurring | Noncurrent Assets | Natural Gas Liquids | Commodity derivatives | | |
Assets: | | |
Amounts offset | 0 | 0 |
Recurring | Noncurrent Assets | Natural Gas | Commodity derivatives | | |
Assets: | | |
Amounts offset | 0 | (934) |
Recurring | Noncurrent Assets | Natural Gas | Deferred Premiums | | |
Assets: | | |
Amounts offset | 0 | 0 |
Recurring | Other current liabilities | Crude Oil | Commodity derivatives | | |
Liabilities: | | |
Amounts offset | 6,937 | 3,721 |
Recurring | Other current liabilities | Crude Oil | Deferred Premiums | | |
Liabilities: | | |
Amounts offset | 5,930 | 87 |
Recurring | Other current liabilities | Natural Gas Liquids | Commodity derivatives | | |
Liabilities: | | |
Amounts offset | 792 | 0 |
Recurring | Other current liabilities | Natural Gas | Commodity derivatives | | |
Liabilities: | | |
Amounts offset | 4,918 | 4,817 |
Recurring | Other current liabilities | Natural Gas | Deferred Premiums | | |
Liabilities: | | |
Amounts offset | 2,177 | 2,456 |
Recurring | Noncurrent Liabilities | Crude Oil | Commodity derivatives | | |
Liabilities: | | |
Amounts offset | 5,581 | 6,087 |
Recurring | Noncurrent Liabilities | Crude Oil | Deferred Premiums | | |
Liabilities: | | |
Amounts offset | 8,001 | 2,113 |
Recurring | Noncurrent Liabilities | Natural Gas Liquids | Commodity derivatives | | |
Liabilities: | | |
Amounts offset | 0 | 0 |
Recurring | Noncurrent Liabilities | Natural Gas | Commodity derivatives | | |
Liabilities: | | |
Amounts offset | 0 | 934 |
Recurring | Noncurrent Liabilities | Natural Gas | Deferred Premiums | | |
Liabilities: | | |
Amounts offset | 0 | 0 |
Recurring | Fair value | | |
Liabilities: | | |
Net derivative position | 2,030 | (13,029) |
Recurring | Fair value | Current Assets | Crude Oil | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 14,232 | 7,427 |
Recurring | Fair value | Current Assets | Crude Oil | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Fair value | Current Assets | Natural Gas Liquids | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 893 | 0 |
Recurring | Fair value | Current Assets | Natural Gas | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 21,071 | 10,546 |
Recurring | Fair value | Current Assets | Natural Gas | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Fair value | Noncurrent Assets | Crude Oil | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 13,995 | 11,613 |
Recurring | Fair value | Noncurrent Assets | Crude Oil | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Fair value | Noncurrent Assets | Natural Gas Liquids | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Fair value | Noncurrent Assets | Natural Gas | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 4,128 | 934 |
Recurring | Fair value | Noncurrent Assets | Natural Gas | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Fair value | Other current liabilities | Crude Oil | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | (17,237) | (12,477) |
Recurring | Fair value | Other current liabilities | Crude Oil | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | (18,298) | (18,202) |
Recurring | Fair value | Other current liabilities | Natural Gas Liquids | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | (322) | 0 |
Recurring | Fair value | Other current liabilities | Natural Gas | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Fair value | Other current liabilities | Natural Gas | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | (2,525) | (3,352) |
Recurring | Fair value | Noncurrent Liabilities | Crude Oil | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | (4,220) | (2,389) |
Recurring | Fair value | Noncurrent Liabilities | Crude Oil | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | (9,469) | (7,129) |
Recurring | Fair value | Noncurrent Liabilities | Natural Gas Liquids | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Fair value | Noncurrent Liabilities | Natural Gas | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | (218) | 0 |
Recurring | Fair value | Noncurrent Liabilities | Natural Gas | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 1 | | |
Liabilities: | | |
Net derivative position | 0 | 0 |
Recurring | Level 1 | Current Assets | Crude Oil | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 1 | Current Assets | Crude Oil | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 1 | Current Assets | Natural Gas Liquids | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 1 | Current Assets | Natural Gas | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 1 | Current Assets | Natural Gas | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 1 | Noncurrent Assets | Crude Oil | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 1 | Noncurrent Assets | Crude Oil | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 1 | Noncurrent Assets | Natural Gas Liquids | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 1 | Noncurrent Assets | Natural Gas | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 1 | Noncurrent Assets | Natural Gas | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 1 | Other current liabilities | Crude Oil | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 1 | Other current liabilities | Crude Oil | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 1 | Other current liabilities | Natural Gas Liquids | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 1 | Other current liabilities | Natural Gas | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 1 | Other current liabilities | Natural Gas | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 1 | Noncurrent Liabilities | Crude Oil | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 1 | Noncurrent Liabilities | Crude Oil | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 1 | Noncurrent Liabilities | Natural Gas Liquids | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 1 | Noncurrent Liabilities | Natural Gas | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 1 | Noncurrent Liabilities | Natural Gas | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 2 | | |
Liabilities: | | |
Net derivative position | 32,322 | 15,654 |
Recurring | Level 2 | Current Assets | Crude Oil | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 14,232 | 7,427 |
Recurring | Level 2 | Current Assets | Crude Oil | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 2 | Current Assets | Natural Gas Liquids | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 893 | 0 |
Recurring | Level 2 | Current Assets | Natural Gas | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 21,071 | 10,546 |
Recurring | Level 2 | Current Assets | Natural Gas | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 2 | Noncurrent Assets | Crude Oil | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 13,995 | 11,613 |
Recurring | Level 2 | Noncurrent Assets | Crude Oil | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 2 | Noncurrent Assets | Natural Gas Liquids | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 2 | Noncurrent Assets | Natural Gas | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 4,128 | 934 |
Recurring | Level 2 | Noncurrent Assets | Natural Gas | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 2 | Other current liabilities | Crude Oil | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | (17,237) | (12,477) |
Recurring | Level 2 | Other current liabilities | Crude Oil | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 2 | Other current liabilities | Natural Gas Liquids | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | (322) | 0 |
Recurring | Level 2 | Other current liabilities | Natural Gas | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 2 | Other current liabilities | Natural Gas | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 2 | Noncurrent Liabilities | Crude Oil | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | (4,220) | (2,389) |
Recurring | Level 2 | Noncurrent Liabilities | Crude Oil | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 2 | Noncurrent Liabilities | Natural Gas Liquids | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 2 | Noncurrent Liabilities | Natural Gas | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | (218) | 0 |
Recurring | Level 2 | Noncurrent Liabilities | Natural Gas | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 3 | | |
Liabilities: | | |
Net derivative position | (30,292) | (28,683) |
Recurring | Level 3 | Current Assets | Crude Oil | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 3 | Current Assets | Crude Oil | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 3 | Current Assets | Natural Gas Liquids | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 3 | Current Assets | Natural Gas | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 3 | Current Assets | Natural Gas | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 3 | Noncurrent Assets | Crude Oil | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 3 | Noncurrent Assets | Crude Oil | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 3 | Noncurrent Assets | Natural Gas Liquids | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 3 | Noncurrent Assets | Natural Gas | Commodity derivatives | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 3 | Noncurrent Assets | Natural Gas | Deferred Premiums | | |
Assets: | | |
Derivative assets before netting | 0 | 0 |
Recurring | Level 3 | Other current liabilities | Crude Oil | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 3 | Other current liabilities | Crude Oil | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | (18,298) | (18,202) |
Recurring | Level 3 | Other current liabilities | Natural Gas Liquids | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 3 | Other current liabilities | Natural Gas | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 3 | Other current liabilities | Natural Gas | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | (2,525) | (3,352) |
Recurring | Level 3 | Noncurrent Liabilities | Crude Oil | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 3 | Noncurrent Liabilities | Crude Oil | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | (9,469) | (7,129) |
Recurring | Level 3 | Noncurrent Liabilities | Natural Gas Liquids | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 3 | Noncurrent Liabilities | Natural Gas | Commodity derivatives | | |
Liabilities: | | |
Derivative liabilities before netting | 0 | 0 |
Recurring | Level 3 | Noncurrent Liabilities | Natural Gas | Deferred Premiums | | |
Liabilities: | | |
Derivative liabilities before netting | $ 0 | $ 0 |