Summary of Significant Accounting Policies - Inventories (Details) - USD ($)
$ in Thousands
Dec. 31, 2016
Dec. 31, 2015
Inventories    
Total $ 521,878 $ 388,952
Positive exchange balances on inventory exchange agreements accounted for as accounts receivable 4,000 3,400
Negative exchange balances on inventory exchange agreements accounted for as accounts payable 13,400 12,100
Distillates: home heating oil, diesel and kerosene    
Inventories    
Total 180,272 156,411
Gasoline    
Inventories    
Total 101,368 62,467
Gasoline blendstocks    
Inventories    
Total 54,582 32,542
Crude Oil    
Inventories    
Total 136,113 102,253
Residual Oil    
Inventories    
Total 29,536 12,895
Propane and other    
Inventories    
Total 3,167 1,469
Renewable identification numbers (RINs)    
Inventories    
Total 631 803
Convenience store inventory    
Inventories    
Total $ 16,209 $ 20,112