Water quality monitoring is a challenging task due to continuous pollution. The rapid development of engineering technologies has paved the way for the development of efficient and convenient computer-based online continuous water-quality assessment techniques. Techniques based on biological-responses are gaining attention, worldwide. Different biosensors have been developed in recent years to monitor real-time biological responses to evaluate water-quality. The survival and function of various organs of the organism depends on the cardiac system. Alterations in the cardiac system could signify the occurrence/initiation of stress in the organism. We developed a real-time online cardiac function assessment system-OCFAS to acquire fish ECG-signals. We obtained P-wave, R-wave, T-wave, PR-intervals, QT-intervals and QRS-complex continuously, which did not affect the normal activities of carp. We exposed Cyprinus carpio to different concentrations (National Environmental Quality Standards) of ammonia for 48 h. Our OCFAS has precisely acquired the required ECG-signals. A real-time dataset reveals sensitivity to ammonia in carp ECG-indexes. Compared with the control group the P-wave, R-wave and T-wave were weaker in ammonia-treated groups. In contrast, the PR-intervals, QT-intervals and QRS-complex were prolonged in the ammonia-treatment groups. The self-organizing map signifies that the PR-intervals, the QRS-complex and the QT-intervals are consistent with environmental stress. Linear regression analysis also quantitatively signifies that the PR interval has the highest R2 value and the lowest SSE-value, followed by the QRS complex and the QT interval. A concentration-related effect was observed in the ammonia treated groups. The integrated biomarker response (IBRv2) index was used to determine the overall stress of ammonia on carp heart ECG-indexes. IBRv2 also supports the real-time response of carp to ammonia stress. Ammonia levels in the aquaculture and water environment require special attention to avoid its adverse effects on the health of aquatic biota. Our study emphasizes the importance of online real-time fish ECG for water-quality assessment.