Non-reflecting boundary conditions (NRBCs) play an important role in computational fluid dynamics (CFD). A novel NRBC based on the method of characteristics using timeline interpolations is proposed for fluid dynamics solved by smoothed particle hydrodynamics (SPH). It is performed by four layers of particles whose pressures and velocities are obtained through the Lagrange interpolation in the time domain which is derived from the propagation of characteristic waves between particles. The proposed NRBC can allow outward travelling pressure and velocity messages to pass through the boundary without obvious reflection. That is, with the implementation of the NRBC, the solution in a finite computational domain of interest is close to that in an infinite domain. Several numerical tests show that this NRBC is robust and applicable for a broad variety of hydrodynamics ranging from low to high speed.