betPlaced example

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

betPlaced example

Postby jc0r » Tue Dec 02, 2014 3:34 pm

Hi all

I am looking for an explaination on the betPlaced event using COM.

I am looking to make my own tick offset using COM and i think i would need to implement the betPlaced event, but am not sure how it actually works.

Currently, i just place bets very simply using code such as:

Code: Select all
ref = ba.placeBet(0 , "L", 2, 2 False)


I do not want to wait for result hence the false in the command as i find this makes Excel hang when i am in markets with a delay imposed by Betfair.

If i wanted to find the status of the above bet, is the betPlaced the event i would need to use and could anybody give me an example on how i would get started please?

Many thanks
User avatar
jc0r
 
Posts: 67
Joined: Wed Mar 15, 2006 6:13 pm
Location: Birmingham

Re: betPlaced example

Postby Captain Sensible » Tue Dec 02, 2014 6:32 pm

I don't use the COM but for my own bots you usually need the placeBets response just to get the BetID so you can query it's status later especially if you want to keep track of it for offsets etc Otherwise I guess you can always just call getBets(): to retrieve all bets for a given market
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Re: betPlaced example

Postby jc0r » Wed Dec 03, 2014 11:37 am

Thanks for the response Cap.

Problem i have though, is waiting for the placeBet response causes Excel to hang while it waits on Betfairs imposed inplay delays. This i why i was kinda hoping i could issue a bet with a token string, that i could call upon later to find out the information needed using the betPlaced event.

Im pretty sure the betPlaced event is what i need, i could just use an example of how it works so i could apply it to my own needs
User avatar
jc0r
 
Posts: 67
Joined: Wed Mar 15, 2006 6:13 pm
Location: Birmingham

Re: betPlaced example

Postby GaryRussell » Thu Dec 04, 2014 1:05 pm

Here is an example spreadsheet:-

http://www.gruss-software.co.uk/Excel/P ... Async.xlsm

Put "BACK_COM" in cell Q5 instead of the normal BACK trigger. You can see the code for Sheet1 will place a bet when it sees this trigger and populates the average price and matched stake columns when bet placed.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK


Return to Discussion

Who is online

Users browsing this forum: No registered users and 58 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.