Empty listMarketBook response

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Acitfc
    Junior Member
    • Oct 2019
    • 6

    #1

    Empty listMarketBook response

    Hi all,

    I have a local Windows environment in Australia and a remote Linux VPS located in the UK.

    I can successfully create a session token and make a listMarketCatalogue call in both environments...however, I only can only make a successful call to listMarketBook in my local Windows setup.

    I'm confident that I am consistent in my approach in both systems, so I'm now wondering whether Betfair has a restriction in place to prevent a user whose home country (Australia) is different to the IP address (UK) from making an API call to listMarketBook and, presumably, placeOrders.

    If anyone can confirm or deny this, I know I'm not barking up the wrong tree and can continue looking elsewhere for my issue, otherwise, I will have to look for a VPS server in Australia.

    Also, if anyone has any other ides of what might be going on, would be great to hear them....................

    Thanks
  • Generalizing
    Junior Member
    • Oct 2019
    • 2

    #2
    Hi Acitfc,

    It shouldn't be affecting it, I would check with the provider and make sure that they are showing the Linux IP address as UK one.

    You can use the following site and check your IP address: https://www.maxmind.com/en/geoip-dem...8aArUUEALw_wcB

    As there are a few countries that don't allow horse betting.

    Tell me how it goes.

    Comment

    • Acitfc
      Junior Member
      • Oct 2019
      • 6

      #3
      Thanks for your reply...

      ​​​​​​Initially I had setup a server in the US and that definitely was the problem, but I checked here and it is definitely a GB IP, Betfair also confirms this in the recent logins in the My Account section and the phone call I got from Betfair support asking if I was currently in London!!!

      Comment

      • LiamP
        Junior Member
        • Oct 2015
        • 284

        #4
        It has to be the code, can you share?

        Comment

        • Acitfc
          Junior Member
          • Oct 2019
          • 6

          #5
          Hi LiamP, thanks for your interest.

          I'm confident it isn't in the code. I have been using Pentaho to make the API calls however decided to try the standard PHP sample code (https://github.com/betfair/API-NG-sample-code/blob/master/php/jsonrpc.php), I just added a print_r() of the listMarketBook result and again, empty on hosted Linux server and populated on local Windows server.



          Comment

          • LiamP
            Junior Member
            • Oct 2015
            • 284

            #6
            Are you sure it’s not nuances between Linux and windows? My understanding is if it’s a location / ip issue then you would get an error in the response and not an empty array.

            Comment

            • Acitfc
              Junior Member
              • Oct 2019
              • 6

              #7
              Having eliminated the code and the IP address, I'm also coming to the conclusion that its nuances between Linux and Windows... But no idea where to look.

              To give me a clue, I was hoping someone may be able to explain any difference in how listMarketBook and listMarketCatalogue work (is there additional security requirements or controls in place retrieving the listMarketBook?). Because I can successfully get a listMarketCatalogue.

              Comment

              • LiamP
                Junior Member
                • Oct 2015
                • 284

                #8
                Can you share your code? (minus creds) My first assumption would be that your marketId is being converted to a float.

                Comment

                • Acitfc
                  Junior Member
                  • Oct 2019
                  • 6

                  #9
                  I like your thinking. The code is literally this:

                  https://github.com/betfair/API-NG-sa...hp/jsonrpc.php

                  listMarketCatalogue is not using a marketId filter however listMarketBook is, when I get home tonight I will try listMarketCatalogue with the same marketId filter in place as listMarketBook, see if I get an empty response and can isolate the issue to the marketFilter.

                  Thanks for the suggestion, will update with a result.

                  Comment

                  • Acitfc
                    Junior Member
                    • Oct 2019
                    • 6

                    #10
                    Still no joy - here is the result of the debug so would suggest to me not an issue with how listMarketBook is parsing the marketId.


                    listMarketCatalogue
                    Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params" :{"filter":{"marketIds":["1.163743652"]},"maxResults":"200"}, "id": 1}]
                    Response: [{"jsonrpc":"2.0","result":[{"marketId":"1.163743652","marketName":"6f Hcap","totalMatched":8502.749866}],"id":1}]
                    listMarketBook
                    Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "params" :{"marketIds":["1.163743652"], "priceProjection":{"priceData":["EX_BEST_OFFERS"]}}, "id": 1}]
                    Response: [{"jsonrpc":"2.0","result":[],"id":1}]

                    Comment

                    Working...
                    X