Lefora Free Forum
465 views

Betdaq throttling

Page 1
posts 1–13 of 13
regular - member
123 posts

Just started writing an infrastructure library in java for betdaq.

Has anyone noticed errorcode 406 'punter is blacklisted' being returned randomly?
Is it their way of throttling or something?

regular - member
134 posts

Yes it is their way of throttling. Here's a relevant bit from an old email (might have changed by now):

The thresholds are applied in a historic 60 second sliding window and the blacklisted in period is also 60 seconds - during this window no API calls will be processed [with exception of Cancel] and an blacklisting return code is sent back to the calling application. You can cancel during a blacklisting window, but this does contribute further to the length of the blacklisting window. You can call the ListBlacklistInformation call to get details of blacklisted API call and how long more the user is blacklisted for.

The below values are default values and we do have the ability to change these on a per user basis, but in reality.

The threshold [per minute are] are

PlaceOrdersNoReceipt = 1000 [count of all calls made to the PlaceOrdersNoReceipt ]
PlaceOrdersWithReceipt = 1000 [count of all calls made to the PlaceOrdersWithReceipt ]
Combined = 1500 [count of all calls made to the api]
Any=1000 [count of calls to any api call other than PlaceOrdersNoReceipt & PlaceOrdersWithReceipt]
ListBootstrapOrders=50
GetEventSubTreeNoSelections=50

superstar - member
230 posts

Austin, are you using Netbeans 6.1? Every time i try to add the betdaq WSDL, i get an error:

__________________
rookie - member
6 posts

Hi,

Might be worth contacting betdaq as they have in the past supplied me with a bespoke WSDL file when I have had problems with their web service.

Sorry I can not supply any more details, but I know they have been helpful with this in the past so worth doing.

regular - member
123 posts

Thanks Fred, thought so ... it's good to hit and find out this kind of thing early on.

birchy, not using netbeans (not sure what soap toolkit it uses under the hood either)... I'm using axis2-1.4 with no problems so far ...

regular - member
184 posts
It uses JAX-WS 2.1 for the wsdl consumption - it is normally just a matter of dropping the URL of the WSDL into the dialogue and accepting the certificates for it to generate the classes for you. I tried mucking around with Axis (1 and 2) and couldn't figure it out. I'm afraid I'm a bit of an IDE victim.

Whatever works though, so long as you get the calls out.

birchy, did you ever figure out how to compress the calls and let the server know you wanted compressed results? If so, how?

Alan
__________________
Slashdot. It's like Digg on slow, but sensible.
novice - member
30 posts

Here are some files from my BETDAQ Java test harness. I managed to get JAX-WS to consume the WSDL by modifying the WSDL to include the namespace that wsimport claims is missing and by renaming the elements (to remove a name conflict) using a binding customization. (When I tinker with Java, I use Eclipse; included is an ant build file for the wsimport task.)
You also have to fight with JAX-WS to get the BETDAQ header into the SOAP requests; you'll need to modify the ExternalApiHeader class that wsimport generates, adding an XML annotation.
The Test class will also show you what you need to do to enable gzip compression for the SOAP requests (if you're using JAX-WS, that is).
That WSDL and SOAP are this complicated is a joke. Simple Object Access Protocol my arse.

FILE: Test.zip
regular - member
123 posts

Sounds like the jax-ws tools you are using might be incomplete somehow. Don't blame poor WSDL and SOAP. :)
Axis2 v1.4 takes the betdaq wsdl no problem straight out of the box.

novice - member
30 posts

It was Sun's JAX-WS reference implementation and, yes, incomplete seems like an appropriate adjective; fragile is another. After looking into what needed to be done to get it to work with the Sun implementation (I'm afraid my curiosity got the better of me) I'd agree that axis2 would be a better choice.

novice - member
20 posts

Almost month ago I realesed BXTrader for Betdaq and received this information about throttling from betdaq api team:

“We want to limit the calls of GetPrices to every 200 ms for all trading applications. We do not see any tangible benefit with a refresh rate lower than this.

Is it possible to have more than 1 market open polling for prices with your application at a time? If so, is there a limitation on the number of markets polling? Do they all poll for prices with the same frequency?

Please note, we will reserve the right to throttle GetPrices calls for people who are significantly and continuously calling GetPrices without placing bets or calling high volumes of GetPrices with a disproportionately low percentage of Placing orders call.”

So keep this in mind when writing betdaq bots.

regular - member
184 posts
Wish I had that kind of problem at the moment - right now I'm seeing betfair API returns take anywhere from 6 to 30 seconds. I'm still trying to figure out if it is because of my mickey mouse Orange ADSL connection or betfair issues.

I'll move this to another thread, I'm going to ask a question which might hijack this one.
__________________
Slashdot. It's like Digg on slow, but sensible.
novice - member
20 posts

inksmithy, I am from Slovakia, so my internet connection latency is not comparable with your one but I can get max. 17 responses per second for market data from betfair web services, slightly lower numbers for betdaq.

regular - member
184 posts
I envy you at the moment stefan - at thhe moment I am getting one possibly two responses per minute.

Well this is the code I'm using:


                if (markClosed == false)
                {
                    System.out.println("1: getting prices " + new Date(System.currentTimeMillis()).toString());
                    this.getThePrices(id);
                }
                else
                {

                    continue;
                }

            }

        }
        completed = true;
    }

    public void getThePrices(int id)
    {
        System.out.println("2: sending " + new Date(System.currentTimeMillis()).toString());
        try
        {
            try
            {
                com.betfair.publicapi.v5.bfexchangeservice.BFExchangeService_Service service = new com.betfair.publicapi.v5.bfexchangeservice.BFExchangeService_Service();
                com.betfair.publicapi.v5.bfexchangeservice.BFExchangeService port = service.getBFExchangeService();
                com.betfair.publicapi.types.exchange.v5.GetMarketPricesCompressedReq request = new com.betfair.publicapi.types.exchange.v5.GetMarketPricesCompressedReq();
                request.setMarketId(id);
                APIRequestHeader theHeader = ExHeader.makeHeader();
                request.setHeader(theHeader);
                com.betfair.publicapi.types.exchange.v5.GetMarketPricesCompressedResp result = port.getMarketPricesCompressed(request);
                System.out.println("3: got them" + new Date(System.currentTimeMillis()).toString());
                if (result.getErrorCode() != result.getErrorCode().OK)
                {
                    System.out.println(result.getErrorCode().value());
                }


and this is an example of the responses I am getting:



1: getting prices Sun Nov 16 14:54:37 GMT 2008
2: sending Sun Nov 16 14:54:37 GMT 2008
14:54:54
14:54:54
3: got themSun Nov 16 14:54:56 GMT 2008
14:54:56
14:54:56
Atromitos v Ionikos
odds difference 1 = 0.0
odds difference 2 = 0.0
1: getting prices Sun Nov 16 14:54:57 GMT 2008
2: sending Sun Nov 16 14:54:57 GMT 2008
3: got themSun Nov 16 14:55:11 GMT 2008


What I've done there is a quick copy paste of the class doing the work.

The
System.out.println()
calls are structured like this:

1. the market ID has passed a test which decides whether the bandwidth should be used and calls the getThePrices() method.
2. the getThePrices method has received the marketID and is starting to work with it.
3. the getThePrices method has received its response from betfair.

I would have posted more examples, but an unrelated bug crept in and I ended up with a null pointer exception in that thread. Just from those two examples though, you can see a fairly massive delay between sending and receiving.

I just got off the phone from Orange and it seems that even though they have stats from my line which show that 'oh yes sir mister rowe you are very definately slower than you should be' (compliment? technical opinion? I dunno) they won't do a line check until I have done three tests at www.speedtester.bt.com and phoned the results in. PITA.

I've told them that unless this is sorted it will be an account breaker.
__________________
Slashdot. It's like Digg on slow, but sensible.
Page 1
posts 1–13 of 13

This Topic Is Locked To Guest Posts

It's been a while since this topic was active, if you'd like to get it going again, please post as a registered member

join now