Conversation so far:
when did the spanish go to the philippines
The history of the Philippines from 1565 to 1898, also known as the Spanish colonial period, was the period during which the Philippines were part of the Spanish Empire.
how did the spanish colonial period in the Philippines end
Spanish rule ended in 1898 with Spain's defeat in the Spanish–American War. The Philippines then became a territory of the United States.

Question: what was the main source of money as a spanish colony
Self-contained rewrite: what was the main source of money for the philippines as a spanish colony