Web Service
From The Contingency Market
The Contingency Market is made available via a web service which provides a general purpose business layer between marketplaces (web applications) and The Contingency Market engine (currently hosted by Digital Productions Ltd).
Web Service URI
The web service is at: contingencymarket.com/api.
Documentation
The Contingency Market web service is concerned with six key aspects:
- Agents - users or web servers, with a variety of roles.
- Events - things that may be observed in the world, that may happen
- Contingencies - outcome specifications, e.g. that an event will happen
- Offers - offers to perform transactions of funds according to a contingency
- Deals - agreements between two agents' offers with a specific mutually acceptable funds transfer
- Payments - transfers of funds between two agents that have resulted from completed deals, or funds deposited or withdrawn by an agent.
However, before a marketplace (application) can utilise the web service it must first establish an authenticated session, i.e. by authenticating the registered agent (that the marketplace is serving) to the Contingency Market. This then provides the marketplace with an authenticated session with which it can access the six key aspects of the web service.
Some agents will define and observe events, e.g. using EnsureEventChild.
Others may review the current contingencies registered, e.g. via ListContingencies and review any open offers via ListOffers.
Client APIs
For details of client APIs that are available to provide access to the web service see Client APIs.

