Master of Coin is a royal official in the government of the Seven Kingdoms. The holder is a member of the monarch's small council, the inner cabinet of the realm. The Master of Coin is in charge of the royal treasury, advises the monarch on financial matters, and is responsible for raising money to meet the Crown's needs.
At the start of the TV series, Lord Petyr Baelish is Master of Coin under King Robert Baratheon. Baelish remains in the role when King Joffrey inherits the throne. As Master of Coin, Baelish is regarded as a financial magician, always able to conjure up gold to meet the Crown's demands.
The post was left vacant for some time after Tyrion's arrest and conviction for the murder of Joffrey. However, after Tywin was himself later murdered by Tyrion, Cersei seized control and reorganized the Small Council. Stacking the council with men loyal to her by handing out offices as rewards, Cersei appointed Mace Tyrell as the new Master of Coin, in addition to the office he already held as Master of Ships.
After Lord Mace was burned alive alongside his children and many others, the post of the Master of Coin became vacant.
In the A Song of Ice and Fire novels, Petyr Baelish was appointed Master of Coin by Hand of the King Jon Arryn, around seven years before the beginning of the narrative. Originally, Jon's wife Lysa had convinced her husband to make Baelish the chief customs officer at the port of Gulltown in the Vale. Baelish excelled at the position, increasing revenue tenfold, so ten years ago Lord Arryn brought him to King's Landing and gave him a minor position in the royal customs office. Baelish increased gross revenues tenfold, and demonstrated such great skill that Arryn rapidly advanced him through a series of promotions, so that within three years he was named Master of Coin for the entire realm. Robert's reign lasted fifteen years in the books (expanded to seventeen in the TV series), and Littlefinger was only Master of Coin for the last seven years, but it is unstated which person (or persons) may have held the position in the early years of King Robert's reign. Thus Baelish is not a holdover from the previous Targaryen Small Council, in contrast to Pycelle and Varys, who formerly served under the Mad King.