getMarketDepth

Please post any questions regarding the program here.

Moderator: 2020vision

getMarketDepth

Postby alrodopial » Wed Dec 05, 2012 12:19 pm

Hi,

Inside the "Worksheet_Change" event ( If Target.Columns.Count = 16 Then) I have the "ba.getMarketDepth False"
There is also the function "ba_getMarketDepthComplete" that is also been running

1. At which point does the "getMarketDepth " runs? (at the end of "Worksheet_Change" event ? (this is what i think))
2. When the "ba_getMarketDepthComplete" runs? (at the end of "Worksheet_Change" event ? (this is what i think))
3. When BA takes the triggers from column Q? (and submits a bet) (before the "Worksheet_Change" event takes place - so before the odds been updated- , at the end (after) of the "Worksheet_Change" event or at the end (or start) of the "ba_getMarketDepthComplete" run)????
Thanks
Al
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby GaryRussell » Thu Dec 06, 2012 11:18 am

The getMarketDepthComplete event is called as soon as the data has been returned by the API and as soon as Excel is ready to run the code. If the API is slow to respond then there could be several worksheet_change events run in between. The only thing you can guarantee is that if you call getMarketDepth in the background in the change event is that getMarketDepth complete cannot be called before executing the remaining code in the change event. Basically this event can be called at anytime after you make the call and no other code is running.

If you want to ensure you have the latest data before triggering bets then you could set a flag before making the call to indicate the data is pending and set it again when getMarketDepthComplete has been called.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Re: getMarketDepth

Postby alrodopial » Thu Dec 06, 2012 11:48 am

Thanks for the above
Now the below:
alrodopial wrote:3. When BA takes the triggers from column Q? (and submits a bet) (before the "Worksheet_Change" event takes place - so before the odds been updated- or at the end (after) of the "Worksheet_Change" event )????
Thanks
Al
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby GaryRussell » Thu Dec 06, 2012 12:37 pm

Triggers are processed after the worksheet change event so the most recent odds are used.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK


Return to Help

Who is online

Users browsing this forum: No registered users and 45 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.