A
counterparty (sometimes
contraparty) is a legal and financial term. It means a party to a contract. A counterparty is usually the entity with whom one negotiates on a given agreement, and the term can refer to either party or both, depending on context.
Any legal entity can be a counterparty. Examples of legal entities are a person, a married couple, a corporation, a limited partnership, a city, etc.
Usually, to say that there are counterparties to an arrangement means that there is some potential for conflict between them. Well-drafted contracts usually attempt to spell out in explicit detail what each counterparty's rights and obligations are in every conceivable circumstance, though there are of course limits. There are general provisions for how counterparties are treated under the law, and (at least in common law legal systems) there are many legal precedents that shape the common law.
Within the financial services sector, the term market counterparty is used to refer to governments, national banks, national monetary authorities and international monetary organisations such as the World Bank Group that act as the ultimate guarantor for loans and indemnities. The term may also be applied, in a more general sense, to companies acting in this role.