7816 Hanoi, provisional designation 1987 YA, is a stony asteroid and Mars-crosser from the inner regions of the asteroid belt, approximately 3 kilometers in diameter. It was discovered by Japanese astronomer Masahiro Koishikawa at the Ayashi Station of the Sendai Astronomical Observatory, Japan, on 18 December 1987.
The S-type asteroid orbits the Sun at a distance of 1.6–3.0 AU once every 3 years and 6 months (1,287 days). Its orbit has an eccentricity of 0.29 and an inclination of 2° with respect to the ecliptic. No precoveries were taken and the asteroid's observation arc begins with its discovery.
In November 2011, a rotational light-curve for this asteroid was obtained from photometric observations made American astronomer by Brian Warner at the at his Palmer Divide Observatory in Colorado. The light-curve gave a rotation period of 7000518000000000000♠5.18±0.02 hours with a brightness variation of 0.72 in magnitude (U=2+). Ten years later, remeasurements of the original images rendered a slightly refined period of 7000517000000000000♠5.17±0.01 and an amplitude of 0.77 (U=3-). The Collaborative Asteroid Lightcurve Link assumes a standard albedo for stony asteroids of 0.20, and calculates a diameter of 3.0 kilometers, based on an absolute magnitude of 15.0.
The minor planet was named after the city of Hanoi, capital of Vietnam, which the discoverer visited in 1997. Together with astronomer Yoshihide Kozai, after whom the minor planet 3040 Kozai is named, he assisted local astronomers install a Schmidt-Cassegrain and a refracting telescope at HNUE. The installed instrumentation was funded by the Japanese Sumitomo Foundation, with the intention to foster Vietnamese astronomical research. Naming citation was published on 2 February 1999 (M.P.C. 33790).