How fast am getting my bets placed inplay?

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
gzanette
Posts: 8
Joined: Fri Jul 13, 2018 3:42 pm

Good Day

Can someone please help me if possible. I want to see how fast my inplay bets are hitting the market. Other softwares show it when the bet gets placed but I can’t seem to find it on BetAngel.

For example : cricket has a 5 second inplay delay..

So what I want to know is after I click to take a bet how long before it hits the market, 5,27seconds/5,91seconds? I have no idea.. I just want to compare the speed to other software.

Thanks in advance.
User avatar
Dallas
Posts: 22723
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

The in-play bet delay is imposed by Betfair and is the same no matter where you place your bets including the Bf website, the countdown timer for pending bets is in the bottom right corner.

It depends on your connection and location as to how fast your bet gets from your PC to the Betfair server (once you have submitted it of course)
gzanette
Posts: 8
Joined: Fri Jul 13, 2018 3:42 pm

100% I understand that. I use the Betangel VPS service. I am merely looking to find out if I can see the exact amount of time program takes to process the bet..
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

gzanette wrote:
Fri Feb 01, 2019 2:49 pm
So what I want to know is after I click to take a bet how long before it hits the market, 5,27seconds/5,91seconds? I have no idea.. I just want to compare the speed to other software.
Everything Dallas said plus....The absolute certainly is that the OS (or BA) has absolutely no control over it. A message gets sent, the confirmation returns, end of.

It also varies quite a lot anyway from second to second. I just ran a performance test to give you a benchmark from my vps (from which I get a 2 or 3ms ping to the BF server) and for 20 attempts my bet submission round trip varied between 64 - 184ms (avg 105ms) and bet cancellation varied between 110 - 291ms (avg 194ms). And that wasn't using BA or the OS or any commercial software, just the lightest possible framework. So the time could be anywhere from x to 3 * x

I just ran the performance test again and the bet submission round trip varied from 58ms to a snail's pace 404ms. But there's no way to know if that was a delay in the bet getting there, the bf liability engine, the bf matching engine, or the confirmations coming back down the wires.

All that said I've no doubt whatsoever that BA does the jobs as fast as it's possible to do it, why wouldn't it? Are you trading manually or automated? If you're manual you might find this fun.... For those obsessed with speed
User avatar
MemphisFlash
Posts: 2161
Joined: Fri May 16, 2014 10:12 pm
Location: Leicester

use one of these that might help you

Stopwatch2.jpg
You do not have the required permissions to view the files attached to this post.
LinusP
Posts: 1873
Joined: Mon Jul 02, 2012 10:45 pm

ShaunWhite wrote:
Fri Feb 01, 2019 4:52 pm
gzanette wrote:
Fri Feb 01, 2019 2:49 pm
So what I want to know is after I click to take a bet how long before it hits the market, 5,27seconds/5,91seconds? I have no idea.. I just want to compare the speed to other software.
Everything Dallas said plus....The absolute certainly is that the OS (or BA) has absolutely no control over it. A message gets sent, the confirmation returns, end of.
Not entirely true, Betfair allow keep alive sesssions, having a session which is already connected can save a round trip which is huge. I have just completed some work on using connection pools and modifying the underlying socket to make sure it stays open.

This is a good read if you want to understand TCP and IP:

https://hpbn.co/#toc
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Thanks. Another case of my 'absolute certainty' not quite living up to its billing. :roll: I should stop trying to answer people's questions.
User avatar
mcgoo
Posts: 898
Joined: Thu Jul 18, 2013 12:30 pm

LinusP wrote:
Fri Feb 01, 2019 6:10 pm
ShaunWhite wrote:
Fri Feb 01, 2019 4:52 pm
gzanette wrote:
Fri Feb 01, 2019 2:49 pm
So what I want to know is after I click to take a bet how long before it hits the market, 5,27seconds/5,91seconds? I have no idea.. I just want to compare the speed to other software.
Everything Dallas said plus....The absolute certainly is that the OS (or BA) has absolutely no control over it. A message gets sent, the confirmation returns, end of.
Not entirely true, Betfair allow keep alive sesssions, having a session which is already connected can save a round trip which is huge. I have just completed some work on using connection pools and modifying the underlying socket to make sure it stays open.

This is a good read if you want to understand TCP and IP:

https://hpbn.co/#toc
Isn't this trading something..The reading/learning can take one from psychology and neuroscience to all 7 layers of the OSI model :shock: :D ..let alone all the other facets of life.Amazing journey..
pythonic
Posts: 65
Joined: Sun Jul 08, 2018 10:20 pm

LinusP wrote:
Fri Feb 01, 2019 6:10 pm
Not entirely true, Betfair allow keep alive sesssions, having a session which is already connected can save a round trip which is huge. I have just completed some work on using connection pools and modifying the underlying socket to make sure it stays open.
Wasn't your betfair library using connection pools already, LinusP?
Thanks for putting it online btw, great work!
LinusP
Posts: 1873
Joined: Mon Jul 02, 2012 10:45 pm

pythonic wrote:
Sun Feb 03, 2019 2:26 pm
LinusP wrote:
Fri Feb 01, 2019 6:10 pm
Not entirely true, Betfair allow keep alive sesssions, having a session which is already connected can save a round trip which is huge. I have just completed some work on using connection pools and modifying the underlying socket to make sure it stays open.
Wasn't your betfair library using connection pools already, LinusP?
Thanks for putting it online btw, great work!
Yes it uses requests which uses the urllib3 connection pool however requests isn’t thread safe so the work was on having multiple connection pools that can be used as I can sometimes be making up to 30 concurrent order requests.
pythonic
Posts: 65
Joined: Sun Jul 08, 2018 10:20 pm

I have to admit that I never thought about thread savety of requests.session (or maybe I just assumed requests would be thread save because it says so on the homepage).
I'm just using one thread per order request currently.
Maybe I should look into that as well.
Group1Buff
Posts: 4
Joined: Wed Feb 06, 2019 10:15 am

LinusP wrote:
Fri Feb 01, 2019 6:10 pm
Not entirely true, Betfair allow keep alive sesssions, having a session which is already connected can save a round trip which is huge. I have just completed some work on using connection pools and modifying the underlying socket to make sure it stays open.

This is a good read if you want to understand TCP and IP:

https://hpbn.co/#toc
Very true and of vital importance if you are on the opposite side of the world of the BF servers as I am! BA is essentially unusable for me if I use it from my home connection due to this 'double trip' phenomenon (not savvy enough to explore keeping sockets open etc). When using it through a VPS the effect is greatly mitigated but it still exists but at least it's manageable.

A bet response time would be a very useful metric despite what some other posters have said, particularly for international users.
LinusP
Posts: 1873
Joined: Mon Jul 02, 2012 10:45 pm

Group1Buff wrote:
Wed Feb 06, 2019 10:28 am
LinusP wrote:
Fri Feb 01, 2019 6:10 pm
Not entirely true, Betfair allow keep alive sesssions, having a session which is already connected can save a round trip which is huge. I have just completed some work on using connection pools and modifying the underlying socket to make sure it stays open.

This is a good read if you want to understand TCP and IP:

https://hpbn.co/#toc
Very true and of vital importance if you are on the opposite side of the world of the BF servers as I am! BA is essentially unusable for me if I use it from my home connection due to this 'double trip' phenomenon (not savvy enough to explore keeping sockets open etc). When using it through a VPS the effect is greatly mitigated but it still exists but at least it's manageable.

A bet response time would be a very useful metric despite what some other posters have said, particularly for international users.
Agreed, it's also two trips if using https.
pythonic
Posts: 65
Joined: Sun Jul 08, 2018 10:20 pm

Based on what I read in the bug reports I think the problems with session and thread safety should only be relevant in certain scenarios where you access lots of different hosts from one Session() btw.
I'll just keep using one session instance for betfair for the time being.
LinusP
Posts: 1873
Joined: Mon Jul 02, 2012 10:45 pm

pythonic wrote:
Thu Feb 07, 2019 8:37 am
Based on what I read in the bug reports I think the problems with session and thread safety should only be relevant in certain scenarios where you access lots of different hosts from one Session() btw.
I'll just keep using one session instance for betfair for the time being.
Not sure how many concurrent requests you make but I get lots of connection errors when trying to use one session, haven't had one since upgrading to multiple sessions and my overall median latency has reduced.
Post Reply

Return to “Bet Angel for newbies / Getting started”