Introduction
From ContingencyMarket
Contents |
Web Service Documentation
Digital Productions' Contingency Market web service provides a general purpose business layer between Digital Productions applications and the Contingency Market engine.
There are five areas currently covered by the Contingency Market web service:
- 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
Before an application can have a web service session it must first authenticate the agent that the application is serving to the Contingency Market. This then provides the application with an authenticated session with which it can access the rest 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.
Clients
The PHP5 client library v0.4 is now released
Version 0.4 of the source code (GPL v2) is downloadable here: CM_PHP_Client_v0.4.zip
By way of simple demonstration it is hosted here: http://www.contingencymarket.com/client_php
All PHP equivalent classes have been implemented, i.e. sessions, agents, events, contingencies, offers, and deals.
Colophon
This site documents the Contingency Market web service, and is currently being produced for Digital Productions by Crosbie Fitch, using the Wikimedia CMS called MediaWiki.
- The domain name of the Contingency Market is: www.contingencymarket.com.
- The location of the web service is currently: contingencymarket.com/api.
- A progress blog is at: www.digitalproductions.co.uk/index.php?s=Market.