WE RELATE FROM the book of at-Tirmidhī and others that ‘Umar ibn al-Khaṭṭāb
reported that the Messenger of Allah
said: “If a person enters the market-place and says: ‘There is no god but Allah. He is Alone and has no partner. To Him belongs sovereignty and to Him belongs all praise; He gives life and He gives death; He is Alive and does not die; in His hand is all good; and He has power over all things,’ one thousand good deeds will be written for him, one thousand bad deeds will be expunged for him, and one thousand stages will be raised for him.” [1].

Lā ilāha illa-llāhu waḥdahu lā sharīka lah, lahu-l-mulk, wa lahu-l-ḥamd, yuḥyī wa yumīt, wa Huwa Ḥayyun lā yamūt, bi-yadihi-l-khayr, wa Huwa ‘alā kulli shay’in qadīr.
Al-Ḥākim Abū ‘Abdullāh reports [the same hadith] in al-Mustadrak from many sources. According to one report he added: “And He will build a house for him in Paradise.” One of the narrators said: “I came to Khurasān, and I went to Qutaybah ibn Muslim and said: ‘I have brought you a gift;’” and he narrated the hadith to him. Qutaybah rode in his entourage until he came to the market. He said [the above-mentioned phrase] and then turned away. Al-Ḥākim also reported this from the narration of Ibn ‘Umar from the Prophet
. Al-Ḥākim says that on the same subject there are hadiths from Jābir, Abū Hurayrah, Buraydah al-Aslamī and Anas, and the [only] one of them that comes closest to meeting the preconditions of his book [2].is the hadith of Buraydah, but not in this wording. He narrates with his isnād that it is reported from Buraydah that when the Messenger of Allah
entered a market he would say: “O Allah, I ask You for the good of this market and the good that is in it, and I seek Your protection from the evil of it and the evil that is in it. O Allah, I seek Your protection from falling victim to a false oath or making a poor bargain there.”

Allāhumma innī as’aluka khayra hādhihi-s-sūqi wa khayra mā fīhā, wa a‘ūdhu bika min sharrihā wa sharri mā fīhā. Allāhumma innī a‘ūdhu bika an uṣība fīhā yamīnan fājirah, aw ṣafaqatan khāsirah.
References
[1] At-Tirmidhī (3425), Ibn Mājah (2235), and al-Ḥākim (1/539).
[2] His condition was that the hadith should be narrated by narrators whom al-Bukhārī and Muslim narrated from.