You can try out opentrade which has implemented IB api, manages internet disconnects, power outages, disconnects on IB's side, daily resets on IB's side. Currently it only implements simple order types (limit/market/stop), but you can customize yourself...