We discuss optimization of the binomial codes and demonstrate that by relaxing the parity structure, codes with even lower unrecoverable error rates can be achieved. The binomial codes are tailored for detecting boson loss and gain errors by means of measurements of the generalized number parity. We present an explicit approximate quantum error recovery operation based on projective measurements and unitary operations. For realistic continuous-time dissipative evolution, the codes can perform approximate quantum error correction to any given order in the time step between error detection measurements. The binomial codes can exactly correct errors that are polynomial up to a specific degree in bosonic creation and annihilation operators, including amplitude damping and displacement noise as well as boson addition and dephasing errors. These "binomial quantum codes" are formed from a finite superposition of Fock states weighted with binomial coefficients. We construct a new class of quantum error-correcting codes for a bosonic mode, which are advantageous for applications in quantum memories, communication, and scalable computation.