Switching between Polling and Streaming via the BA API, including setting the Guardian Refresh rate

Help improve Bet Angel.
Post Reply
sniffer66
Posts: 1680
Joined: Thu May 02, 2019 8:37 am

As per above

On a Saturday\Sunday my football coupon will typically load 2500 markets into Guardian, which forces me to use polling at 200ms. During the week I'm pretty much always under 1000. I remove markets each day, via the API, when I know they won't be entered, typically 5 mins after KO.
This means I can manually switch to streaming at 20ms at some point in the day, when the loaded market count is under 1000

Given I can return a count of the loaded markets in Guardian using the BA API, it would be very useful if we could use the API to switch between both comms types, setting the refresh rate at the same time

Thanks
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Just leave it on streaming. What would be useful via the api is to initiate a refresh of the market subscription to pick up new events and/or changed start times, or after an outage.
sniffer66
Posts: 1680
Joined: Thu May 02, 2019 8:37 am

ShaunWhite wrote:
Thu Aug 10, 2023 6:38 pm
Just leave it on streaming. What would be useful via the api is to initiate a refresh of the market subscription to pick up new events and/or changed start times, or after an outage.
I can't Shaun, there's a 1000 market limit in Guardian for streaming. Any markets after the 1000 cap fail to initialise
Anbell
Posts: 2062
Joined: Fri Apr 05, 2019 2:31 am

sniffer66 wrote:
Thu Aug 10, 2023 7:24 pm
ShaunWhite wrote:
Thu Aug 10, 2023 6:38 pm
Just leave it on streaming. What would be useful via the api is to initiate a refresh of the market subscription to pick up new events and/or changed start times, or after an outage.
I can't Shaun, there's a 1000 market limit in Guardian for streaming. Any markets after the 1000 cap fail to initialise
Can you use a second instance of BA?
sniffer66
Posts: 1680
Joined: Thu May 02, 2019 8:37 am

Anbell wrote:
Fri Aug 11, 2023 1:48 am
sniffer66 wrote:
Thu Aug 10, 2023 7:24 pm
ShaunWhite wrote:
Thu Aug 10, 2023 6:38 pm
Just leave it on streaming. What would be useful via the api is to initiate a refresh of the market subscription to pick up new events and/or changed start times, or after an outage.
I can't Shaun, there's a 1000 market limit in Guardian for streaming. Any markets after the 1000 cap fail to initialise
Can you use a second instance of BA?
I'm afraid not. I'm loading up to 5 markets per event and passing values between them. They need to be in the same instance

I'm not sure using the API across multiple instances on the same device is possible anyway. The suggestion I've made would be straightforward solution - start on polling and switch to streaming via code when the markets drop below 1000
Post Reply

Return to “Suggestions”