Hyperpolarization-activated ion channel exhibiting weak selectivity for potassium over sodium ions. Contributes to the native pacemaker currents in heart (If) and in neurons (Ih). Can also transport ammonium in the distal nephron. Produces a large instantaneous current. Activated by cAMP, and at 10-100 times higher concentrations, also by cGMP. cAMP binding causes a conformation change that leads to the assembly of an active tetramer and channel opening. Channel activity is modulated by intracellular chloride ions and pH; acidic pH shifts the activation to more negative voltages (By similarity). Homotetramer. Heterotetramer with HCN1. The potassium channel is composed of a homo- or heterotetrameric complex of pore-forming subunits. Forms an obligate 4:4 complex with accessory subunit PEX5L. Interacts with KCNE2 (By similarity). Highly expressed in neonatal and adult ventricle and in brain. Highly expressed in the pyramidal layer in hippocampus, in anterior dorsal nucleus in thalamus, in the mammillary nucleus in hypothalamus, in red nucleus, in trigeminal mesencephalic, spinal and principal nuclei, in cochlear and trapezoid nuclei and in the dorsal tegemental nucleus. By thyroid hormones in hypothyroid animals. The segment S4 is probably the voltage-sensor and is characterized by a series of positively charged amino acids at every third position. Phosphorylation at Ser-641 by PRKG2 shifts the voltage-dependence to more negative voltages, hence counteracting the stimulatory effect of cGMP on gating. Belongs to the potassium channel HCN family.