Betfair API Heartbeat

We were all new to Bet Angel once. Ask any question you like here and fellow forum members promise not to laugh. Betfair trading made simple.
Post Reply
Wolf1877
Posts: 367
Joined: Fri Sep 08, 2017 10:59 am

I believe that the Betfair API offers a heartbeat facility to automatically close positions in the event of internet connection failure with the API client. Does Bet Angel give the option to use this facility or is it planned for a future release? Or is there something that I can do outside of Bet Angel to enable this facility?

I thought I had lost 20% of my bank on the 15:20 at Carlisle today thanks to a connection failure one minute before the off whilst adjusting my position. Fortunately I'm still on quite a small bank while gaining experience but it's still a very disconcerting. I was aware of the possibility of this happening so I'll put it down as a valuable lesson learnt but I do need to have a contingency plan to quickly bail out in future. Heartbeat would be ideal as I'm pretty sure I would lose a hell of a lot less by auto greening in most cases than by completely losing control at a key point.

Update. Actually it turns out I'm slightly up. :D - Betfair seemed a little slow in updating my P&L on this race.
Nonetheless I still need to think about how to deal with this possibility in future.
User avatar
Kafkaesque
Posts: 886
Joined: Fri Oct 06, 2017 10:20 am

I know, this isn't what you're asking, but I'll leave it here all the same: 20% seems a hell of a lot on one position, under even the best of circumstances, much less while still "gaining experience".

Personally, I used a Kelly approach amended for this kind of trading. Might be a bit conservative for some? But 20% seems huge, or is it just me?
LinusP
Posts: 1871
Joined: Mon Jul 02, 2012 10:45 pm

It doesn’t close positions, just cancels all unmatched and I dont think its available on BA.

‘Cash out’ isn’t available (yet) on the API.
Wolf1877
Posts: 367
Joined: Fri Sep 08, 2017 10:59 am

Linus, thanks again. I should have read the Betfair API documentation in more detail I guess.
Wolf1877
Posts: 367
Joined: Fri Sep 08, 2017 10:59 am

Kafkaesque wrote:
Thu Oct 26, 2017 4:32 pm
I know, this isn't what you're asking, but I'll leave it here all the same: 20% seems a hell of a lot on one position, under even the best of circumstances, much less while still "gaining experience".

Personally, I used a Kelly approach amended for this kind of trading. Might be a bit conservative for some? But 20% seems huge, or is it just me?
Kafkaesque, as a relative newbie I'm not sure what the general consensus is. Obviously I wasnt expecting to lose 20% or win 20% on a single market, more like win up to 4% and maybe lose up to 2%. But if you get caught mid trade then it is possible to lose the entire stake or more if lay positions are left open when a network outage strikes. Happy to hear any opinions on this though.
Trader Pat
Posts: 4327
Joined: Tue Oct 25, 2016 12:50 pm

A lot of guys use a back up laptop with a dongle so if your main internet connection goes down you can just jump on the laptop.

Personally I just use the Betfair app on my iphone and it works fine for me as a back up, just make sure youre iphone/smart phone isnt connected to the wifi.
User avatar
Kafkaesque
Posts: 886
Joined: Fri Oct 06, 2017 10:20 am

Wolf1877 wrote:
Thu Oct 26, 2017 5:22 pm
Kafkaesque wrote:
Thu Oct 26, 2017 4:32 pm
I know, this isn't what you're asking, but I'll leave it here all the same: 20% seems a hell of a lot on one position, under even the best of circumstances, much less while still "gaining experience".

Personally, I used a Kelly approach amended for this kind of trading. Might be a bit conservative for some? But 20% seems huge, or is it just me?
Kafkaesque, as a relative newbie I'm not sure what the general consensus is. Obviously I wasnt expecting to lose 20% or win 20% on a single market, more like win up to 4% and maybe lose up to 2%. But if you get caught mid trade then it is possible to lose the entire stake or more if lay positions are left open when a network outage strikes. Happy to hear any opinions on this though.
I won't pretend to know, what you're staking should be :) It's just, as BF has been running for the last year or whatever, it's not only an outage on your side of things, you should be worried about :evil: So, no matter the intention of only losing a max of 2%, you're in reality risking 20% all the same a certain percentage of time. Make you're own judgement of what that percentage is, given the risk of an outage on your end, or of BF going down.

FWIW, I'd look into Kelly Criterion (and possibly other staking methods) as well as risk of ruin. Also, to help you use those tools, try to cut the maybe from "maybe lose up to..." via stop-loss or other methods to determine risk in any given trade, plus add on whatever you feel is appropriate towards your actual exposure, ie. somewhere in between 2% and 20% in the above scenario. Finally, remove more like from "more like win...." and try to determine your average expected yield or roi (in as many differenciated scenarios as possibly), as you gain experience and tangible results to extract data from.

I'm by no means a guru on this subject, so just my two cents, and take it for what it's worth ;)
Wolf1877
Posts: 367
Joined: Fri Sep 08, 2017 10:59 am

Trader Pat wrote:
Thu Oct 26, 2017 5:26 pm
A lot of guys use a back up laptop with a dongle so if your main internet connection goes down you can just jump on the laptop.

Personally I just use the Betfair app on my iphone and it works fine for me as a back up, just make sure youre iphone/smart phone isnt connected to the wifi.
Pat, I'll definitely install the Betfair App on my phone and as a back up plan. Ideally someone would write an ios /android "Betfair green up and abort panic button" app.
When the stakes go up I'll think about other alternatives.
Wolf1877
Posts: 367
Joined: Fri Sep 08, 2017 10:59 am

Kafkaesque wrote:
Thu Oct 26, 2017 5:53 pm

I won't pretend to know, what you're staking should be :) It's just, as BF has been running for the last year or whatever, it's not only an outage on your side of things, you should be worried about :evil: So, no matter the intention of only losing a max of 2%, you're in reality risking 20% all the same a certain percentage of time. Make you're own judgement of what that percentage is, given the risk of an outage on your end, or of BF going down.

FWIW, I'd look into Kelly Criterion (and possibly other staking methods) as well as risk of ruin. Also, to help you use those tools, try to cut the maybe from "maybe lose up to..." via stop-loss or other methods to determine risk in any given trade, plus add on whatever you feel is appropriate towards your actual exposure, ie. somewhere in between 2% and 20% in the above scenario. Finally, remove more like from "more like win...." and try to determine your average expected yield or roi (in as many differenciated scenarios as possibly), as you gain experience and tangible results to extract data from.
OK thanks Kafkaesque. I'll look into your suggestions and give some thought to what is the appropriate worst case level of risk.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

You need to be prepared for BF outages as well, i've seen this happen more times than my own pc or connection has gone down
I do this by taking SP on all open positions and with a funded BD account
https://www.betangel.com/blog_wp/2016/1 ... k-up-plan/
Trader Pat
Posts: 4327
Joined: Tue Oct 25, 2016 12:50 pm

I've learned that lesson the hard way :)
Wolf1877
Posts: 367
Joined: Fri Sep 08, 2017 10:59 am

Dallas wrote:
Thu Oct 26, 2017 6:52 pm
You need to be prepared for BF outages as well, i've seen this happen more times than my own pc or connection has gone down
I do this by taking SP on all open positions and with a funded BD account
https://www.betangel.com/blog_wp/2016/1 ... k-up-plan/
Dallas, thanks for the link and the BetDaq suggestion. I've not experienced any actual Betfair outages yet but useful to know that they do happen and It's useful to have a bail out strategy pre-prepared. I guess I could probably use Excel VBA to auto load orders into the BetDaq version of BetAngel to counter balance my Betfair position in the worst case scenario.
Post Reply

Return to “Bet Angel for newbies / Getting started”