Author Topic: Trigger not cancelling bets when market is suspended  (Read 1427 times)

Tags:
  • All members
  • Posts: 42
Hi all,

I'm not sure if this is a bug, or I've got something set incorrectly.

If a market is suspended when a trigger cancels a bet, the bet remains, although I am able to cancel it using the betting interface.

Below is the log from the trigger. As you can see, trigger cancelled the bet when the market was idle (I kept adding the bet back using the interface to test), but once the market was suspended (at around 10:48:37), although the condition was true, it didn't try to cancel the bet. The condition then went false after I cancelled the bet manually using the interface.

10:48:02   Checking market "Greyhound Racing / AUS / Cran (AUS) 11th Mar / 10:48 Cran (AUS) 11th Mar - R10 311m Gr4/5".
10:48:02   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:48:02   Condition is: TRUE. valid for 1 selections: 6. Rock Me David.
10:48:02   Going to cancel the following bets:
the following selections £ 2.00 at 1.01 on "6. Rock Me David"
10:48:12   Checking market "Greyhound Racing / AUS / Cran (AUS) 11th Mar / 10:48 Cran (AUS) 11th Mar - R10 311m Gr4/5".
10:48:12   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:48:12   Condition is: FALSE.
10:48:22   Checking market "Greyhound Racing / AUS / Cran (AUS) 11th Mar / 10:48 Cran (AUS) 11th Mar - R10 311m Gr4/5".
10:48:22   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:48:22   Condition is: TRUE. valid for 1 selections: 6. Rock Me David.
10:48:22   Going to cancel the following bets:
the following selections £ 2.00 at 1.01 on "6. Rock Me David"
10:48:32   Checking market "Greyhound Racing / AUS / Cran (AUS) 11th Mar / 10:48 Cran (AUS) 11th Mar - R10 311m Gr4/5".
10:48:32   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:48:32   Condition is: TRUE. valid for 1 selections: 6. Rock Me David.
10:48:32   Going to cancel the following bets:
the following selections £ 2.00 at 1.01 on "6. Rock Me David"
10:48:42   Checking market "Greyhound Racing / AUS / Cran (AUS) 11th Mar / 10:48 Cran (AUS) 11th Mar - R10 311m Gr4/5".
10:48:42   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:48:42   Condition is: TRUE. valid for 1 selections: 6. Rock Me David.
10:48:52   Checking market "Greyhound Racing / AUS / Cran (AUS) 11th Mar / 10:48 Cran (AUS) 11th Mar - R10 311m Gr4/5".
10:48:52   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:48:52   Condition is: TRUE. valid for 1 selections: 6. Rock Me David.
10:49:02   Checking market "Greyhound Racing / AUS / Cran (AUS) 11th Mar / 10:48 Cran (AUS) 11th Mar - R10 311m Gr4/5".
10:49:02   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:49:02   Condition is: TRUE. valid for 1 selections: 6. Rock Me David.
10:49:12   Checking market "Greyhound Racing / AUS / Cran (AUS) 11th Mar / 10:48 Cran (AUS) 11th Mar - R10 311m Gr4/5".
10:49:12   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:49:12   Condition is: FALSE.


It's easy to test with greyhounds because they don't go in-play.


Reggie

  • All members
  • Posts: 42
Re: Trigger not cancelling bets when market is suspended
« Reply #1 on: 13 Mar 2020, 14:40 »
Anyone??

One of the sports I use MFP for is football and there's a lot of games currently that are remaining suspended, even though they're down as turning in-play. It would be handy to release those funds earlier for use in other markets.


Reggie

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Trigger not cancelling bets when market is suspended
« Reply #2 on: 13 Mar 2020, 19:29 »
Hi!

This is the first time I hear about the ability to cancel a bet when a market is suspended.

Can you take a screenshot of the betting interface (I presume you're referring to BetFair's website interface) where you cancel an unmatched bet when a market is suspended?
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 42
Re: Trigger not cancelling bets when market is suspended
« Reply #3 on: 14 Mar 2020, 10:06 »
Hi Oxa,

Thank you for getting back to me.

It seems you can cancel bets while the market is suspended. It's only recently that I've wanted to do this, so I haven't noticed before. It seems that if the market is marked to go in-play and you fire a bet with persistence on (otherwise it'll be cancelled automatically) when the market is idle, but when the event starts, if the market doesn't then go in-play, you can cancel the bet.

I've confirmed this in football, where I've had an umatched bet once the game has started, it was supposed to go in-play, but just remained suspended. I can see the bet in the Betfair web interface, but I can cancel the bet in the MFP interface and it dissapears from the Betfair web interface (without any interaction in the Betfair web interface) and the funds are then added back to my available balance. The market is still suspended after this.

So basically, I can cancel the bet in the MFP interface, from the list of unmatched bets, but a trigger won't cancel it.

I hope that makes sense. Let me know if you need any more.


Reggie

  • All members
  • Posts: 42
Re: Trigger not cancelling bets when market is suspended
« Reply #4 on: 14 Mar 2020, 10:40 »
Here's another trigger log from a test trigger I created...


10:28:00   Checking market "Soccer / Indian Football / Indian I-League 2nd Division / Fixtures 14 Mar / Kerala v Mumbai City FC II / Over/Under 3.5 Goals".
10:28:00   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:28:00   Condition is: TRUE. valid for 1 selections: Under 3.5 Goals.
10:28:00   Checking condition and Market's Name contains "Kerala v Mumbai City".
10:28:00   Selection: Under 3.5 Goals, initial expr.: "Kerala v Mumbai City", intermediate: "Kerala v Mumbai City", final: "Kerala v Mumbai City".
10:28:00   Condition is: TRUE. valid for 1 selections: Under 3.5 Goals.
10:29:00   Checking market "Soccer / Indian Football / Indian I-League 2nd Division / Fixtures 14 Mar / Kerala v Mumbai City FC II / Over/Under 3.5 Goals".
10:29:00   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:29:00   Condition is: TRUE. valid for 1 selections: Under 3.5 Goals.
10:29:00   Checking condition and Market's Name contains "Kerala v Mumbai City".
10:29:00   Selection: Under 3.5 Goals, initial expr.: "Kerala v Mumbai City", intermediate: "Kerala v Mumbai City", final: "Kerala v Mumbai City".
10:29:00   Condition is: TRUE. valid for 1 selections: Under 3.5 Goals.

***** I cancelled the bet at this point, from the unmatched bet column using the MFP interface. *****

10:30:00   Checking market "Soccer / Indian Football / Indian I-League 2nd Division / Fixtures 14 Mar / Kerala v Mumbai City FC II / Over/Under 3.5 Goals".
10:30:00   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:30:00   Condition is: FALSE.
10:30:00   Remaining conditions in the block will not be checked.
10:31:00   Checking market "Soccer / Indian Football / Indian I-League 2nd Division / Fixtures 14 Mar / Kerala v Mumbai City FC II / Over/Under 3.5 Goals".
10:31:00   Checking condition and Selection's Number of Unmatched Lay Bets is greater than 0.
10:31:00   Condition is: FALSE.
10:31:00   Remaining conditions in the block will not be checked.


Ignore where I metioned the greyhounds in my first message, I was inadvertently in test mode. I was definitely in "real" mode with the footbal though, as I could see the bets in the Betfair web interface.


Reggie

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Trigger not cancelling bets when market is suspended
« Reply #5 on: 15 Mar 2020, 15:40 »
Using the bet persistence, you can cancel a bet when the market is In-Play, not when the market is Suspended. You have probably cancelled the bet manually when the market was In-Play.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 42
Re: Trigger not cancelling bets when market is suspended
« Reply #6 on: 16 Mar 2020, 13:32 »
Hi Oxa,

I understand what you're saying with turning off bet persistence to cancel bets when the market turns in-play. However, I'm definitely able to cancel bets with bet persistence on and the market is suspended,  either on the Betfair web or the MFP interfaces manually, but a trigger won't cancel the bet.

Obvisously this is after placing a bet (with persistence on) whilst the market is idle. Then, once the event starts, the market doesn't turn in-play, but remains suspended.


Reggie

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Trigger not cancelling bets when market is suspended
« Reply #7 on: 17 Mar 2020, 16:17 »
I have contacted the BetFair support about this and they confirmed that unmatched bets can be cancelled at some point when a market is suspended. However, this will not always be possible, as at times the exchange will be processing bets, and if you attempt to cancel a bet at that time, you will get an error. The API does not provide any means to check whether now it is the right time to cancel a bet.

Apparently, their advice is to let the customer try anyway and then deal with an error if necessary.

I will rework the code to accommodate for these changes. Thank you for bringing this issue to my attention!
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 42
Re: Trigger not cancelling bets when market is suspended
« Reply #8 on: 17 Mar 2020, 18:26 »
No problem Oxa and thanks for looking into it.

I guess you may get an error when a market is suspended prior to being closed once the event has finished or enough goals scored etc. I haven't had any errors cancelling bets, so I guess I've done it during normal play.

 

Please note, BetFair is seems to be currently OFFLINE