Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:12:20

And they sold him for a reduced price - a few dirhams - and they were, concerning him, of those content with little.  

Then they sold him — they ˹the caravan˺ purchased him from them — for a very low, a diminished, price, a handful of dirhams, 20 or 22; for they, that is, his brothers, set small store by him. So the caravan brought him to Egypt, where the one who had bought him sold him for 20 dinars, two pairs of sandals and two robes.
القرآن:١٢:٢٠

وَشَرَوْهُ بِثَمَنٍ بَخْسٍ دَرَاهِمَ مَعْدُودَةٍ وَكَانُوا فِيهِ مِنَ الزَّاهِدِينَ  

{وشروه} باعوه منهم {بثمن بخس} ناقص {دراهم معدودة} عشرين أو اثنين وعشرين {وكانوا} أي إخوته {فيه من الزاهدين} فجاءت به السيارة إلى مصر فباعه الذي اشتراه بعشرين دينارا وزوجي نعل وثوبين.

See similar narrations below:

Collected by Bayhaqī
bayhaqi:12135Abū Naṣr ʿUmar b. ʿAbd al-ʿAzīz b. Qatādah > Abū al-Ḥasan Muḥammad b. al-Ḥusayn b. Ismāʿīl al-Sarrāj > Abū Khalīfah > Abū al-Walīd And Ibn Kathīr > Shuʿbah > Yūnus > al-Ḥasan > ʿAlī

And they sold him for a reduced price - a few dirhams - and they were, concerning him, of those content with little. (Using translation from Qurʾān 12:20)   

البيهقي:١٢١٣٥أَخْبَرَنَا أَبُو نَصْرٍ عُمَرُ بْنُ عَبْدِ الْعَزِيزِ بْنِ قَتَادَةَ أنبأ أَبُو الْحَسَنِ مُحَمَّدُ بْنُ الْحُسَيْنِ بْنِ إِسْمَاعِيلَ السَّرَّاجُ ثنا أَبُو خَلِيفَةَ ثنا أَبُو الْوَلِيدِ وَابْنُ كَثِيرٍ عَنْ شُعْبَةَ عَنْ يُونُسَ عَنِ الْحَسَنِ عَنْ عَلِيٍّ ؓ أَنَّهُ قَضَى فِي اللَّقِيطِ

أَنَّهُ حُرٌّ وَقَرَأَ هَذِهِ الْآيَةَ {وَشَرَوْهُ بِثَمَنٍ بَخْسٍ دَرَاهِمَ مَعْدُودَةٍ وَكَانُوا فِيهِ مِنَ الزَّاهِدِينَ} [يوسف 20]