Limit Data From listMarketBook

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PeteTheBloke
    Junior Member
    • Apr 2011
    • 11

    #1

    Limit Data From listMarketBook

    I would like to get a very small amount of data from this function until it gets close to off time. How can I just retrieve totalMatched and get a lot of markets at once? At the moment I am sending

    Code:
    '{"marketIds":[ event_ids ],"priceProjection":{"priceData":["EX_TRADED"]}}'
    and it sends so much back that I can't even get 100 markets.

    Thanks for any help.
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    Do you need all markets for your events? Do all the events begin at the same time? Can you split your event_ids string into smaller strings and get a few marketBooks at a time in separate calls?

    If these don't suit, maybe you could give us a little more idea about what you're aiming to do, and we can suggest something else.

    Comment

    • PeteTheBloke
      Junior Member
      • Apr 2011
      • 11

      #3
      Originally posted by jabe View Post
      Do you need all markets for your events? Do all the events begin at the same time? Can you split your event_ids string into smaller strings and get a few marketBooks at a time in separate calls?

      If these don't suit, maybe you could give us a little more idea about what you're aiming to do, and we can suggest something else.
      Thanks Jabe. To keep a long story short, I am getting all the market IDs for football matches through the navigation methods and storing them locally. Some of them are several days (or more) in the future, but I only want to set my cunning plan in motion when a certain amount has been matched. Clearly, I can ask for, say, 10 markets at a go, but I want to be efficient about it and minimise the amount of data transferred and the number of calls to the service. If I could just get the sum traded and nothing else, I could probably get 100 markets at a go.

      Comment

      • jabe
        Senior Member
        • Dec 2014
        • 705

        #4
        My current program is also looking at football games. I did wonder how much data it was retrieving, so I added code to add it all up and display it on the screen, along with calls/second and bits/second figures. Naturally, the initialisation process uses up quite a lot, but it soon settles down. There's also an estimate of total data retrieved for the current day, and it's surprisingly small - typically in the order of 10-20MB, at maybe 1-2MB per hour. Which is, in the scheme of things, not very much at all.

        My program is driven by a timer, and it goes through several lists of games, checking the prices (for one game at a time) at various frequencies, and changing the checking frequencies depending on how close kick-off is, etc. Would this help with yours?

        I might be a bit old-school when it comes to programming - I like files to be compact and I like code to be fast. That said, I've a program that does arithmetic on very large numbers and I added a factorise routine to it last year. The other day, I tried it with a number 11 digits long and it was doing five million checks per second, which I thought was impressive.

        So, what I'm wondering is: does the extra data make that much difference? (yes, I know it's a waste, but I don't think there's much you can do about it); can you check some games less often? (perhaps you'll find out for different categories of games the time that your favoured matched amount is reached).

        I'm sure you'll have seen various of the betting programs that one can subscribe to (Geek's Toy, etc), and I'm certain that in the lat 10 minutes before a horse race, and during the race, they're making API calls considerably more often than my program does and than yours needs to do.

        Hope this might be a help in some way.

        Comment

        • PeteTheBloke
          Junior Member
          • Apr 2011
          • 11

          #5
          Thanks Jabe. Maybe you're right - I just hate the idea of waste and inefficiency. For me, it won't make a lot of difference, but BF talk about keeping calls down and data transfer to a minimum so I wanted to do things right, if the option was there.

          Like a lot of programmers, I find a way to get the job done and am happy with that. A few weeks ago I realised that I had spent years getting BF data without gzipping it. Nobody has ever slapped my wrist, so I quietly added the necessary headers and went on my merry way.

          Comment

          • jabe
            Senior Member
            • Dec 2014
            • 705

            #6
            I know just what you mean and perhaps others will have some better ideas. As a comparison, it's not unusual to retrieve a single web page with 100KB+ of data in it (there's a site about Android and its pages had/have ridiculous amounts of data); add in some photos, and you're talking perhaps another 50K each. It soon adds up.

            Comment

            • LiamP
              Junior Member
              • Oct 2015
              • 284

              #7
              How come you are not using the navigation request?

              http://docs.developer.betfair.com/do...r+Applications

              Comment

              • PeteTheBloke
                Junior Member
                • Apr 2011
                • 11

                #8
                Originally posted by LiamP View Post
                How come you are not using the navigation request?

                http://docs.developer.betfair.com/do...r+Applications
                I use it to get the markets, but I don't think it's the correct tool for finding the sum matched, is it?

                Comment

                • LiamP
                  Junior Member
                  • Oct 2015
                  • 284

                  #9
                  Originally posted by PeteTheBloke View Post
                  I use it to get the markets, but I don't think it's the correct tool for finding the sum matched, is it?
                  Good point I didn't read your comment properly, how about streaming? You can then request for just changes in traded volume.

                  Comment

                  • PeteTheBloke
                    Junior Member
                    • Apr 2011
                    • 11

                    #10
                    Originally posted by LiamP View Post
                    Good point I didn't read your comment properly, how about streaming? You can then request for just changes in traded volume.
                    Streaming is the way to go, really. It just means I need to start the program from scratch. Being lazy, I suppose

                    Comment

                    • geoffw123
                      Senior Member
                      • Mar 2014
                      • 250

                      #11
                      Hi Pete

                      I was unclear from your original post, are you trying to get the total matched for the market, or the total matched per 'runner' ?
                      I am guessing you mean the latter ?

                      Geoff

                      Comment

                      • PeteTheBloke
                        Junior Member
                        • Apr 2011
                        • 11

                        #12
                        Originally posted by geoffw123 View Post
                        Hi Pete

                        I was unclear from your original post, are you trying to get the total matched for the market, or the total matched per 'runner' ?
                        I am guessing you mean the latter ?

                        Geoff
                        Geoff - just the market total. The idea is that I can get a list of markets well in advance and then monitor them to see when something starts happening.

                        Comment

                        Working...
                        X