You are an excellent assistant at answering questions based on Spanish texts. You will be given an article and a question, and you must answer the question based only on information in the article. The response should be extracted from the context verbatim.

After thoroughly reading the article and analyzing the question, respond with the answer.

Title:
Qing_dynasty

Context:
Yongzheng also inherited diplomatic and strategic problems. A team made up entirely of Manchus drew up the Treaty of Kyakhta (1727) to solidify the diplomatic understanding with Russia. In exchange for territory and trading rights, the Qing would have a free hand dealing with the situation in Mongolia. Yongzheng then turned to that situation, where the Zunghars threatened to re-emerge, and to the southwest, where local Miao chieftains resisted Qing expansion. These campaigns drained the treasury but established the emperor's control of the military and military finance.

Question:
When was the Treaty of Kyakhta written?

1727