Short answer: Kind of
You can if:
- you have an additional action to spare (uncovering then covering the coin would count as two object interactions).
- your DM thinks a closed fist "completely covers" the coin.
Long answer
The Rules as Written are silent on this exact point, but there are two main rules of relevance here.
Object interactions
The rules for object interactions on PHB 190 are the most obvious ones to apply here - ultimately you are interacting with the coin.
You can also interact with one object or feature of the environment for free, during either your move or your action.
Although this rule is not completely explicit about what "interacting with one object" means, several of the examples given on the same page suggest that this interaction is a one way-process.
The clearest examples of this are:
- draw or sheathe a sword
- open or close a door
Furthermore the example of:
is pretty close to what you are talking about here, and is a one-way process.
So, as far as object interaction rules go, you could either cover or uncover the coin for free, but you would have to use your action to do both on one turn.
"Completely covering"
As the Darkness spell description says:
Completely covering the source of the object with an opaque object, such as a bowl or a helm, blocks the darkness.
So your DM will have to rule if simply enclosing a coin in your hand does the trick. The idea of darkness in D&D is so contrary to physics, that this is a tough one to rule, but your DM might rule that some of the darkness seeps through the gaps between your fingers, your hand is not sufficiently opaque etc.
So...
then you can go with your creative plan. Otherwise you might have to modify it a bit: use your only action but benefit the party, find a more 'darkproof' container etc.