Hi all,
I'm building a Python bot that integrates with BetAngel Guardian via the local API and I've hit a wall with stored values that I'm hoping someone can help with.
**Setup:**
- BetAngel Professional v1.63
- Python bot writing stored values via POST to `http://localhost:9000/api/automation/v1 ... oredValues`
- Guardian automation rule with conditions checking stored values to trigger a LAY bet
**What I'm doing:**
My Python bot writes stored values to arm Guardian when a signal fires:
```json
{
"writeToMarketLog": true,
"markets": [{
"id": "1.23456789",
"selections": [{
"id": 12345678,
"sharedValues": [
{"n": "armed", "v": 1},
{"n": "lay_ready", "v": 1},
{"n": "entry_price", "v": 3.50},
{"n": "stake", "v": 2.0}
]
}]
}]
}
```
The BetAngel Log tab confirms the values are being written:
```
[API]: Set Stored Value (Shared) for [Runner]: armed = 1
[API]: Set Stored Value (Shared) for [Runner]: lay_ready = 1
```
**The problem:**
My Guardian rule has two conditions:
- `armed` for current selection = 1
- `lay_ready` for current selection = 1
The rule never fires. After much investigation I believe the issue is that the Conditions tab in the Guardian rule editor reads **instance-local** stored values, but the API is writing **shared** stored values — and there's no Shared checkbox visible in the Conditions tab to switch between them.
**Questions:**
1. Is there a way to write **instance-local** stored values via the `setStoredValues` API? I tried changing `sharedValues` to `instanceValues` in the payload but the API rejected it silently.
2. Is there a different payload field name for instance-local values?
3. Alternatively — is there a way to make the Guardian rule conditions read **shared** stored values written by the API?
4. Has anyone successfully triggered a Guardian rule via the API using stored value conditions?
**What I've already tried:**
- `sharedValues` in payload — values write correctly but rule doesn't fire
- `instanceValues` in payload — API call fails silently, nothing written
- Confirmed rule applies to Guardian Nominated Selection 1
- Confirmed stored values ARE being written (visible in Log tab)
- Manually setting armed=1 in BetAngel's stored values panel works (rule fires)
That last point is the key — when I set the values manually in BetAngel the rule fires correctly. So the rule configuration is right. It's purely the API-written values not being readable by the rule conditions.
Any help much appreciated. Running v1.63 on Windows 11.
Thanks
BetAngel API & Guardian question
Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
1 post
• Page 1 of 1
Post Reply
1 post
• Page 1 of 1
Return to “Bet Angel - Automation”
Jump to
- Bet Angel Professional - Betfair trading software
- ↳ Bet Angel - Release & version history
- ↳ Announcements
- ↳ Bet Angel - FAQ's
- ↳ Bet Angel for newbies / Getting started
- ↳ Bet Angel - Tips and tricks
- ↳ Bet Angel - Spreadsheet / Excel chat
- ↳ Bet Angel - Example spreadsheets
- ↳ Horse racing
- ↳ Trade analysis & record keeping
- ↳ Tips and tricks
- ↳ Excel Power Query
- ↳ Bet Angel - Automation
- ↳ Bet Angel - Total Performance Data - FAQ's
- ↳ Bet Angel Automation - Shared files
- ↳ Bet Angel Automation - Football
- ↳ Bet Angel Automation - Tennis
- ↳ Bet Angel Automation - Horse racing - In-running
- ↳ Bet Angel Automation - Horse racing - Pre off
- ↳ Bet Angel Automation - General
- ↳ Bet Angel - API
- ↳ Bet Angel Automation - Betfair trading alerts
- ↳ Tennis trading alerts
- ↳ Bet Angel - Servants
- ↳ Bet Angel - Servants - Shared files
- ↳ Bet Angel - Customisation, settings, filters and coupons.
- ↳ Market selection filters
- ↳ Market coupons
- ↳ One Click trading interface
- ↳ Ladder trading interface
- ↳ Advanced charting
- ↳ In-play trader tool
- ↳ Guardian market list layouts
- ↳ TPD / Total Performance Data
- ↳ Suggestions
- ↳ Betfair trading videos - For current videos visit www.betangel.tv
- ↳ Support
- Betfair trading & Sports Betting strategies
- ↳ General discussion
- ↳ Australian
- ↳ Deutsche
- ↳ Español
- ↳ Italiano
- ↳ русский
- ↳ Trading Horse racing
- ↳ Football trading
- ↳ Trading Financial markets
- ↳ Cryptocurrency
- ↳ Tennis Trading
- ↳ Trading Psychology
- ↳ Other Betfair Sports Trading markets
- ↳ Trading Golf
- ↳ Rugby
- ↳ Boxing
- ↳ Non Sports trading Markets
- ↳ Political betting & arguing
- ↳ Technology
- ↳ Betfair Cricket trading
- ↳ Betfair trading strategies
- ↳ Sports betting strategies
- ↳ Loss recovery systems and methods
- ↳ Trading Greyhound racing
- ↳ AI, Machine Learning and Generative AI
- Betting exchange & Bookmakers reviews and advice
- ↳ Chill Out Area
- ↳ Betfair exchange
- ↳ Betfair Data
- ↳ Betfair Exchange API
- ↳ Betdaq exchange
- ↳ Alternative betting exchanges, Smarkets, Matchbook etc.
- ↳ Bookmaker & Sportsbooks
- ↳ Prediction Markets
-
- Bet Angel Quicklinks
