A system exchanging tea from the central plains for frontier horses: the Uyghurs traded horses for tea under the Tang, the Northern Song set up a Tea and Horse Office to trade state tea for horses, and the state-run trade ended under the Qing Yongzheng emperor; it served both economic exchange and border stability.

Tang to Qing dynasty
760 · OriginIn the mid-Tang, Uyghur envoys came driving horses to trade for tea, starting the frontier exchange of tea for horses, which spread to Tibet as tea entered the plateau.1074 · EvolutionIn 1074 (Xining 7 of the Northern Song), a Tea and Horse Agency was set up in Chengdu to exchange state tea for Tibetan horses, institutionalising the tea-horse trade.1735 · ImpactIn 1735 (Yongzheng 13) the Qing stopped buying horses with tea in Gansu, ending the official tea-horse exchange; the tea-horse agencies became tea agencies, and the last, at Taozhou, closed in 1760.
Sources (5)
  1. 茶马互市的历史 (Xinhua)
  2. History of Tea-horse Road (China Highlights)
  3. 赵珍、高煜潮《清前期西北茶马司与茶司》,《青藏高原论坛》2023年第2期(藏人文化网转载)
  4. 茶马 - 维基百科(引《清史稿·茶法》雍正十三年'复停甘肃中马,改征折色';王晓燕〈论清代官营茶马贸易的延续及其废止〉)
  5. 光明日报 2018-12-08《“茶马司”里茶马互市的记忆》

The central plains produced tea and needed horses; the frontier bred horses and needed tea. The tea-horse trade took shape from this match: the central plains gave tea for frontier horses, under government management, and it also helped keep the border settled.

In the middle of the Tang, Uyghur envoys came driving horses to trade for tea, and the frontier exchange of tea for horses began there, spreading to Tibet as tea entered the plateau.

In 1074 (Xining 7 of the Northern Song) the court set up a Tea and Horse Agency in Chengdu to trade state tea specifically for Tibetan horses, and the tea-horse trade became an established system.

In 1735 (Yongzheng 13) the Qing stopped buying horses with tea in Gansu, and the official tea-horse trade ended. The tea-horse agencies became tea agencies, and by 1760 (Qianlong 25) the last of them, at Taozhou, had been closed.

The Tea-Horse Frontier Trade is the class in the chapter on Commerce on the trade of tea for horses: the state-run border trade in which the central plains exchanged tea for frontier horses, from the Tang to the Qing. Uyghurs drove horses to trade for tea in the Tang, the Northern Song set up a tea-horse agency to exchange state tea for Tibetan horses, and the official trade ended in the Yongzheng reign of the Qing. It supplied each side with what it lacked and also helped keep the border settled.