Does anyone know how to get Soccer prices from the UK exchange?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OzPunter
    Junior Member
    • Apr 2009
    • 161

    #1

    Does anyone know how to get Soccer prices from the UK exchange?

    Hi,

    Making very slow progress with the new API-NG.

    I’m trying to get price data for SOCCER and in particular Correct Score prices.

    I can get prices for Horse Racing but when I apply the same code logic to Soccer I get NULL.

    I have set my session, exchange to UK, and my app key, that seems to be OK.

    I have set Price Projection to EX_ALL_OFFERS and Order Projection to ALL and Match Projection to NO_ROLLUP.

    I’ve tried different combinations of these settings and no matter what I set I end up with a NULL result, no error message and nothing to indicate what is wrong.

    The response is always '{"jsonrpc":"2.0","result":[],"id":"1"}'

    Anyone got any clues?

    Kind Regards
    OzPunter
  • betdynamics
    Junior Member
    • Sep 2010
    • 534

    #2
    Can you post up the json string that you are SENDING to Betfair as that will help diagnose the issue.

    Comment

    • OzPunter
      Junior Member
      • Apr 2009
      • 161

      #3
      Thanks BetDynamics, this seems to be what I'm sending..
      I can't see whats wrong with it..


      '{"method":"SportsAPING\/v1.0\/listMarketBook","params":{"marketIds":["27277341"],"priceProjection":{"virtualise":false,"priceData" :["EX_ALL_OFFERS"],"rolloverStakes":false},"orderProjection":"ALL"," matchProjection":"NO_ROLLUP","currencyCode":"AUD"} ,"id":"1","jsonrpc":"2.0"}'

      Comment

      • betdynamics
        Junior Member
        • Sep 2010
        • 534

        #4
        First thing that leaps out is that the marketId appears to be incorrect.

        marketIds have a prefix - "1." for UK markets, "2." for AUS markets

        I'm not sure if this is a UK or AUS market, but the marketId should be either 1.27277341 or 2.27277341

        Here is a typical string from one of my apps:

        Code:
        {"jsonrpc":"2.0","method":"SportsAPING/v1.0/listMarketBook","params":{"marketIds":["1.115714855"],"priceProjection":{"priceData":["EX_BEST_OFFERS"],"exBestOffersOverrides":{"bestPricesDepth":0,"rollupModel":"STAKE","rollupLimit":2,"rollupLiabilityThreshold":0.0,"rollupLiabilityFactor":0},"virtualise":true}},"id":1}
        Not all of the parameters may be necessary, but this works for me.
        Last edited by betdynamics; 02-10-2014, 08:55 AM.

        Comment

        • OzPunter
          Junior Member
          • Apr 2009
          • 161

          #5
          Originally posted by betdynamics View Post
          First thing that leaps out is that the marketId appears to be incorrect.

          marketIds have a prefix - "1." for UK markets, "2." for AUS markets

          I'm not sure if this is a UK or AUS market, but the marketId should be either 1.27277341 or 2.27277341

          Here is a typical string from one of my apps:

          Code:
          {"jsonrpc":"2.0","method":"SportsAPING/v1.0/listMarketBook","params":{"marketIds":["1.115714855"],"priceProjection":{"priceData":["EX_BEST_OFFERS"],"exBestOffersOverrides":{"bestPricesDepth":0,"rollupModel":"STAKE","rollupLimit":2,"rollupLiabilityThreshold":0.0,"rollupLiabilityFactor":0},"virtualise":true}},"id":1}
          Not all of the parameters may be necessary, but this works for me.
          Thanks BetDynamics,

          The Id I'm using was taken from the GetEvents function.. I'll have to dig deeper and see if I can find the Market ID.. That's about the only thing it can be.

          Thanks
          OzPunter

          Comment

          • OzPunter
            Junior Member
            • Apr 2009
            • 161

            #6
            Originally posted by OzPunter View Post
            Thanks BetDynamics,

            The Id I'm using was taken from the GetEvents function.. I'll have to dig deeper and see if I can find the Market ID.. That's about the only thing it can be.

            Thanks
            OzPunter

            Yes BetDynamics, that was the problem...

            somehow I got the silly notion that if I asked for Soccer Events that the id would be that of the Correct Score market, of course it's not, you have to drill down from event though Market Catalogue to get the MarketID for the Market you want.

            Silly me.. Life's not so simple after all...

            Thanks again,
            Kind Regards
            OzPunter

            Comment

            • OzPunter
              Junior Member
              • Apr 2009
              • 161

              #7
              Next Question -- Correct Score soccer markets

              I need a way to get a list of all the Correct Score soccer markets quickly.

              If I get a list of soccer matches, I find there are 158 matches around the world today.

              I then have to call Market Catalogue for each Event to get the Correct Score Market Id's.

              This takes forever...

              Can I make one call to get all of the MarketID's for all available Correct Score markets?

              I tried requesting several in blocks at a time but I get the “TOO_MUCH_DATA” error.

              What I would like is to get a list of all available Correct Score markets in one call, without having to get all the Soccer Matches first and troll though them searching for Correct Score markets, which most of them have anyway.

              Kind Regards
              OzPunter

              Comment

              • betdynamics
                Junior Member
                • Sep 2010
                • 534

                #8
                Just do a single call to listMarketCatalogue, setting the eventTypeId to 1, the marketTypeCodes to CORRECT_SCORE, the start and end times required, and ensure that maxResults is set to 1000.

                Also make sure you ask for both EVENT and MARKET_START_TIME in marketProjection.

                No need to do the listEvents call at all.
                Last edited by betdynamics; 04-10-2014, 08:48 PM.

                Comment

                • OzPunter
                  Junior Member
                  • Apr 2009
                  • 161

                  #9
                  Originally posted by betdynamics View Post
                  Just do a single call to listMarketCatalogue, setting the eventTypeId to 1, the marketTypeCodes to CORRECT_SCORE, the start and end times required, and ensure that maxResults is set to 1000.

                  Also make sure you ask for both EVENT and MARKET_START_TIME in marketProjection.

                  No need to do the listEvents call at all.
                  Dear BetDynamics,

                  That concept works ok except that I have to limit the returns to about 100 otherwise I get the too much data error.

                  I've tried limiting the returns on the start times and end times but it still geives me everything, so if I can figure out how the times thing works I think that will help limit the data.

                  Working on it..

                  Kind Regards
                  OzPunter

                  Comment

                  • OzPunter
                    Junior Member
                    • Apr 2009
                    • 161

                    #10
                    Ok,

                    setting the start toime to the present DATE+time and setting the end time to DATE + time + 4 hours works correctly.. I was trying to get just 4 hours before which in 1901/01/01 + 4 hours and that seems to default to everything..

                    Kind Regards
                    OzPunter

                    Comment

                    Working...
                    X