The town is first recorded c. 800 bc and has been the seat of local government since at least the Qin. By the 16th century, it was a regional financial hub; some consider it to have been the financial centre of the Qing Empire in the late 19th century. It is a UNESCOWorld Heritage Site anda AAAAA-rated tourist attraction.