Contingency
From The Contingency Market
Contents |
Overview
A contingency is a specification of a combination of events and other contingencies for the purpose of it being used as the basis of a contingency offer and a possible contingency deal.
A contingency is comprised of the following four aspects:
- Conditional Events - all conditional events must succeed in any order before the contingency can succeed.
- Antecedent Contingencies - contingencies that must succeed earlier than the conditional events succeed.
- Preemptive Contingencies - contingencies that if any succeed earlier have the same effect as the conditional events succeeding.
- Collateral Contingencies - contingencies that must also succeed at some point for this contingency to be considered to have succeeded.
A contingency can always be involved in offers and deals, or be referenced by other contingencies - even after its success or failure has been determined.
API Methods
You can register a contingency using RegisterContingency(). This will return an existing contingency if an identical one has already been registered. If you want to find out whether a contingency has already been registered, without consequently registering it, you can use MatchContingency().
All contingencies have ids, and you can get the details of a contingency given only its id by using GetContingency().
You can count all the contingencies that have been registered using CountContingencies(), and list their details using ListContingencies().
Notes
Integrity
The potential outcome defined by a Contingency is specified in terms of events and other Contingencies. Once created, it is important to guarantee that it cannot be retrospectively modified. Therefore the ID of the Contingency is actually a computed value that is a secure hash of its specification (including the IDs of its dependencies).

