So if i get this right, it's either a Silver or a Horn of Plenty for cards you have. I assume it's balanced, but i get the feeling that this is just "Mint for actions" with a bit of added complexity (Treasure type, coin production, discard clause...) so they are more different. The basic concept is compelling, if a little redundant, but the stuff beyond it feels... added.
Well, the fact that it's a Treasure matters because otherwise you'd be unable to duplicate terminal Actions without a village. Yes, you could have "play an Action then gain a copy of it" or some such, but the Treasure is more flexible in the same way Scheme is: you don't have to always collide the Magic Mirror with the Action you want to duplicate; you can draw the Mirror later.
Because it's a Treasure, the +$2 is nice just because it's nice when Treasures produce coins; that's ostensibly their purpose. It's also nice to differentiate it from Horn of Plenty a bit. But setting those two things aside for a moment, let's compare it to a version that produces $0 and doesn't require you to discard Treasures. That version would be stronger when it's strong and weaker when it's weak, and it's hard to say whether than would be more or less fun. I think it would certainly be crazier. They could really easily gain themselves and then gain a bunch of copies of some powerful non-terminal Action (Baker, Grand Market, Highway, etc.) really quickly. The version I laid out (with +$2) makes it way harder to go crazy because you actually have to have 2 Treasures in hand to discard for each card you want to gain. And at the same time it's better when you fail to match it up with a card you want more of. So it's less swingy than a version worth $0, for better or worse.
My thought process was actually something like, "It would be good if this produced at least $1, but I think it might be too strong if it did that and also gained you a great card. Ah, what if you have to discard a Treasure to 'pay' for the card you gain?" And then I decided that discarding two Treasures made it a bit more meaningful; something you actually had to shoot for, you know? So it's worth $2 instead of $1.
I haven't tested it yet, so I'm not sure it's balanced. I've printed it out, though, so I hope to test it sometime next week at the latest.