Bet Angel
×
Full Guide

Guardian component

 

Purpose

 
To control Bet Angel Guardian and the markets it manages.
 
Currently via the API you can:
 

Endpoint

 
http://localhost:<port>/api/guardian/v1.0/<operationName>
 
e.g. http://localhost:9000/api/guardian/v1.0/applyCoupon
 

Operations

 
 addMarkets
 
 
Adds each of the Market Ids, listed in the instruction, to Guardian.
 
Notes:
  • Having used this operation, it is recommended that your API client waits a while before attempting to getMarkets as depending on the number of new markets added and the refresh interval of Guardian, it can take from a few seconds to a few minutes before all market/selection information has been retrieved from betfair.
 
 
 applyCoupon
 
 
Checks that the coupon named in the instruction is known to Bet Angel Guardian and then applies it to Guardian. All markets that satisfy the coupon's market filter will be appended to Guardian and will be loaded into the specified Watch List.
 
The instruction also contains options for clearing Guardian and/or the Watch List before loading the new markets.
 
Notes:
  • The contents of the Coupon tab page in Guardian will not be affected by this operation
  • Guardian must have been made visible at least once since starting Bet Angel before this operation can be used.
  • Having used this operation, it is recommended that your API client waits a while before attempting to getMarkets as depending on the number of new markets added and the refresh interval of Guardian, it can take from a few seconds to a few minutes before all market/selection information has been retrieved from betfair.
  • The response contains a list of market Ids that were added by applying the coupon.
 
 
 applyRules
 
 
Checks that the Automation Rules File named in the instruction is known to Bet Angel Guardian and that it is suitable (i.e. not a Servant) and applies it to Guardian's markets list.
 
The marketsFilter in the instruction specifies whether the rules will be applied to all of the markets or just some of them.
The instruction also tells Guardian which of its Automation Rules columns will be given the rules.
 
If the markets in the marketsFilter were specified by Id (rather than just using ALL) then any of those markets that were not found in Guardian will be returned as an error and the PROCESSED_WITH_ERRORS status will be returned in the response.
 
 
 removeMarkets
 
Removes each of the Market Ids, listed in the instruction, from Guardian. If required, the ALL filter can be used in the marketsFilter rather than providing individual Market Ids. The operation can also be limited by the status of the market so that only Closed or Suspended markets are removed.
 
The response contains the list of markets that were removed (as Market Id & Market Name pairs).
If the markets to be removed were specified by Id (rather than just using ALL) then any of those markets that were not found in Guardian will be returned as an error and the PROCESSED_WITH_ERRORS status will be returned in the response.
 
 
removeRules
 
 
Removes the Automation Rules currently assigned to the specified Guardian column.
The marketsFilter in the instruction specifies whether the rules will be removed from every market in Guardian or just the ones Market Ids provided.
 
If the markets in the marketsFilter were specified by Id (rather than just using ALL) then any of those markets that were not found in Guardian will be returned as an error and the PROCESSED_WITH_ERRORS status will be returned in the response.