The system should subscribe or unsubscribe from a market based on the following conditions:
- Market Activation
- Condition: When the market status changes to active (
s = true). - Action: Subscribe to the market to begin tracking updates.
- Condition: When the market status changes to active (
- Market Recall
- Condition: When the market is recalled (
rt = true). - Action: Resubscribe to the market to track new updates after it has been recalled.
- Condition: When the market is recalled (
- Event Lifecycle Updates
- Condition: When the event game-over (
go) status changes. - Action:
- Unsubscribe from or stop tracking the market upon event completion (when
go = true). - Ensure appropriate re-subscription handling for any subsequent valid event updates.
- Unsubscribe from or stop tracking the market upon event completion (when
- Condition: When the event game-over (
- Market Lifecycle Updates
- Condition: When you receive
"go": true. - Action: If the
goflag in the response is set totrue, it indicates that the market is closed or the event has finished, and you should unsubscribe from it.
- Condition: When you receive
- SDK Connection Status
- Condition: When a
connect: truestatus is received from the SDK callback. - Action: Re-establish subscriptions for all relevant active markets that may have been missed during the SDK downtime.
- Condition: When a
- Manual Unsubscribe
- Condition: If the user no longer wishes to receive updates for the market.
- Action: The market can be manually unsubscribed by the user to stop receiving updates.