No rules exist for determining how much gold a particular trader has
The DMG gives wide latitude to the DM to determine how the PCs can sell their stuff, and so it does not give any numbers or tables for estimating the amount of gold a particular trader has.
Instead, it takes a different approach, where it asks the PCs to try to find a buyer for magic items (DMG 130):
For each item a character wishes to sell, the player rolls ... The subsequent total determines what a buyer offers to pay for the item.
You determine a buyer's identity. Buyers sometimes procure rare and very rare items through proxies to ensure that their identities remain unknown. If the buyer is shady, it's up to you whether the sale creates legal complications for the party later.
While this is specific to magic items, the DMG doesn't have much else to say about the wealth of merchants. As you can see, this advice is mostly geared toward making new plot hooks, rather than crafting a reasonable economy.
You should consider why you want to limit player gold
I've never liked putting limits on player wealth by what they can sell. In the best case it doesn't matter at all, and in the worst case the PCs end up with a ton of "valuable" crap they can't get rid of because of an arbitrary-seeming cap.
Instead, I've just assumed that most treasures/non-magic/non-plot items they find are automatically converted to gold the next time they visit town. If I want the PCs to have limited wealth, then I limit the treasure they can find. If I want them to be forced to go somewhere else to sell their goods, I give them items that the merchants don't want to buy, or have them search out buyers, as described above. This is a lot more efficient, I find, than doing this kind of bait-and-switch trick.