The reading shrank from a deficit of 42.3 billion yuan reported in July, according to the State Administration of Foreign Exchange (SAFE).
In dollar terms, the forex settlement deficit in August dropped 64 percent year on year.
The decline in the forex settlement deficit of banks partly offset an expansion of deficit in non-banking sectors, contributing to the largely balanced supply and demand in the country's forex market, said SAFE spokesperson Wang Chunying.
Forex purchases by banks stood at 1.2 trillion yuan last month, while sales reached about 1.24 trillion yuan.
The data led to a forex settlement deficit of 304.9 billion yuan for the first eight months of the year, according to the SAFE.
Despite fluctuations in the external environment, the trading behavior of market entities has been rational and orderly, indicating that China's forex market is more mature, Wang said.
The country's foreign exchange reserves expanded slightly to 3.1072 trillion U.S. dollars at the end of August, up by 0.1 percent from the end of July, previous data showed.