Main canon - We don't know.
It's not entirely clear what Quark knows about Q, other than that he clearly takes the million bar bid totally at face value, suggesting that he's at least aware that Q is no mere penniless Starfleet Captain.
Q: [Bids] A million.
Quark can die happy now.
QUARK: A million bars of gold press latinum.
Q-Less: Original Screenplay
Quark has, thus far in the episode seen Q twice before. Once in Vash's quarters when he was transported away (and returned confused)
VASH: I don't know. You didn't give him time to tell me. Now bring him back this instant.
Q: Oh, very well.
Quark REAPPEARS. Vash looks around and Q is gone. (Lose one Q FLASH.)
ANGLE ON QUARK
a picture of confusion.
And then again in the fantasy boxing ring, which he may or may not remember after Q sent everyone back to where they came from.
On neither occasion do we get any indication what he does or doesn't know.
EU - He knows exactly who and what Q is.
Within the EU novels the answer is rather more simple. Quark, a man who makes it his business to know things about things (following Rule of Acquisition #194) has been asking around about Q. Not only has he gained a broad understanding of Q's powers and capabilities, he's also shared a photograph of him with the entire Ferengi nation along with a dire warning to steer a very wide path if he's encountered. In the scene below, Nagus Zek is speaking with Q.
I turned back to the Ferengi. “Have we met?” I asked.
“No! But...but Quark...he circulated a picture of you to all Ferengi after you appeared at Deep Space 9! He said you were the most dangerous being in the entire cosmos!”
His whining was becoming quite grating, but I rather enjoyed his terror. “Ah, flattery,” I sighed. “You’d be amazed how far that gets you.”
He was now on his knees begging. It was a sight to see. “Look...I’m sure we can work something out...you can take half my earnings...no...no, take all of them...in fact, you can have the whole business...just don’t kill me with one of your thoughts. Quark said you could—”