Request "listMarketCatalogue" -> Connection timed out!!!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jacky
    Junior Member
    • Dec 2018
    • 21

    #1

    Request "listMarketCatalogue" -> Connection timed out!!!!

    https://api.betfair.com/rest/v1/listMarketCatalogue/
    params: {"filter":{"eventIds":"29052018"}, "maxResults":"10"}
    More details code https://screenshots.firefox.com/6ZWQnmNgqoQtWPJD/null

    But as result of error:
    * Trying 84.20.200.10...
    * TCP_NODELAY set
    * connect to 84.20.200.10 port 443 failed: Connection timed out
    * Failed to connect to api.betfair.com port 443: Connection timed out
    * Closing connection 0
    Call to api-ng failed:
    Response: null

    WHY!!!!?????
    Thank you for helping!!!!!!!!!!!!
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    Your endpoint is missing a chunk. It should be
    https://api.betfair.com/exchange/betting/rest/v1.0/

    Comment

    • Jacky
      Junior Member
      • Dec 2018
      • 21

      #3
      Originally posted by jabe View Post
      Your endpoint is missing a chunk. It should be
      https://api.betfair.com/exchange/betting/rest/v1.0/
      Thank you for your help.
      But seems that no work as screenshot https://screenshots.firefox.com/emgPkDumnXxLcYTC/null
      As result that:
      Post Data: {"filter":{"eventIds":"29049097"},"maxResults":"10 "}

      * Trying 84.20.200.10...
      * TCP_NODELAY set
      * connect to 84.20.200.10 port 443 failed: Connection timed out
      * Failed to connect to api.betfair.com port 443: Connection timed out
      * Closing connection 0
      Response: null

      Call to api-ng failed:
      Response: null

      Comment

      • jabe
        Senior Member
        • Dec 2014
        • 705

        #4
        My apologies; I forgot to mention this.

        When the documentation asks for a SET, like this

        Set<String> or Set<marketBettingType> or any other Set

        you can code one or more parameters of the required type, but you must code them as an array separated with commas, if more than one. JSON requires arrays to be listed between square brackets.

        It can also return arrays, and these will be presented between square brackets.

        Your request needs to look like this:

        {"filter":{"eventIds":["29049097"]},"maxResults":"10"}

        Comment

        • Jacky
          Junior Member
          • Dec 2018
          • 21

          #5
          Originally posted by jabe View Post
          My apologies; I forgot to mention this.

          When the documentation asks for a SET, like this

          Set<String> or Set<marketBettingType> or any other Set

          you can code one or more parameters of the required type, but you must code them as an array separated with commas, if more than one. JSON requires arrays to be listed between square brackets.

          It can also return arrays, and these will be presented between square brackets.

          Your request needs to look like this:

          {"filter":{"eventIds":["29049097"]},"maxResults":"10"}
          Thank you Jabe, very useful!
          But even if modified, it seems that still not works as below the same error..., does any paramter lack of? Or other?
          Post Data: {"filter":{"eventIds":["29049097"]},"maxResults":"10"}

          * Trying 84.20.200.10...
          * TCP_NODELAY set
          * connect to 84.20.200.10 port 443 failed: Connection timed out
          * Failed to connect to api.betfair.com port 443: Connection timed out
          * Closing connection 0
          Response: null

          Call to api-ng failed:
          Response: null


          Comment

          • jabe
            Senior Member
            • Dec 2014
            • 705

            #6
            Getting more difficult! I have run the call with filter from your latest post in the test part of my program and it worked.

            Something more basic has not worked. I assume you have managed to log in at Betfair.

            I wonder if you could try the listCountries call, because it can be made with an empty filter, as in "filter":{}

            Could you display the curl string with its parameters as it is sent, perhaps?





            Output from the call:

            {"jsonrpc":"2.0","result":[{"marketId":"1.152529918","marketName":"Cards Over/Under 4.5","totalMatched":0.0},{"marketId":"1.152529884" ,"marketName":"West Ham +1","totalMatched":5.16},{"marketId":"1.152529833" ,"marketName":"Corners Over/Under 10.5","totalMatched":81.18},{"marketId":"1.1525298 16","marketName":"West Ham win both halves","totalMatched":0.0},{"marketId":"1.1525299 19","marketName":"Corners Match Bet","totalMatched":0.0},{"marketId":"1.152529885" ,"marketName":"Corners Odds","totalMatched":0.0},{"marketId":"1.152529834 ","marketName":"To Score","totalMatched":27.32},{"marketId":"1.152529 817","marketName":"West Ham Clean Sheet","totalMatched":48.6},{"marketId":"1.1525299 16","marketName":"Anytime Wincast","totalMatched":0.0},{"marketId":"1.152529 882","marketName":"Draw no Bet","totalMatched":650.56}],"id":1}

            Comment

            • Jacky
              Junior Member
              • Dec 2018
              • 21

              #7
              Originally posted by jabe View Post
              Getting more difficult! I have run the call with filter from your latest post in the test part of my program and it worked.

              Something more basic has not worked. I assume you have managed to log in at Betfair.

              I wonder if you could try the listCountries call, because it can be made with an empty filter, as in "filter":{}

              Could you display the curl string with its parameters as it is sent, perhaps?





              Output from the call:

              {"jsonrpc":"2.0","result":[{"marketId":"1.152529918","marketName":"Cards Over/Under 4.5","totalMatched":0.0},{"marketId":"1.152529884" ,"marketName":"West Ham +1","totalMatched":5.16},{"marketId":"1.152529833" ,"marketName":"Corners Over/Under 10.5","totalMatched":81.18},{"marketId":"1.1525298 16","marketName":"West Ham win both halves","totalMatched":0.0},{"marketId":"1.1525299 19","marketName":"Corners Match Bet","totalMatched":0.0},{"marketId":"1.152529885" ,"marketName":"Corners Odds","totalMatched":0.0},{"marketId":"1.152529834 ","marketName":"To Score","totalMatched":27.32},{"marketId":"1.152529 817","marketName":"West Ham Clean Sheet","totalMatched":48.6},{"marketId":"1.1525299 16","marketName":"Anytime Wincast","totalMatched":0.0},{"marketId":"1.152529 882","marketName":"Draw no Bet","totalMatched":650.56}],"id":1}
              I have tied your method, but still not work:
              I have tried PHP sample code, all response is as the same as below, whatever jsonrpc or rescript.
              I have login https://screenshots.firefox.com/NQNk...nt.betfair.com
              What language do you test with, PHP? Could you share your code with me? Thank you!

              * Trying 84.20.200.10...
              * TCP_NODELAY set
              * connect to 84.20.200.10 port 443 failed: Connection timed out
              * Failed to connect to api.betfair.com port 443: Connection timed out
              * Closing connection 0
              Response: null


              Comment

              • jabe
                Senior Member
                • Dec 2014
                • 705

                #8
                My code is in Visual Basic.NET. I included a page in my program which allows testing of calls.

                Has your program logged into Betfair?

                Comment

                • Jacky
                  Junior Member
                  • Dec 2018
                  • 21

                  #9
                  I have login via API, I confirm. Can you trace my requesting log to check error? Any other method can help me out?

                  Comment

                  • jabe
                    Senior Member
                    • Dec 2014
                    • 705

                    #10
                    I'm trying to think what a useful next step might be.

                    One thing you might try is the keepAlive call.

                    Just spotted the REST examples, so I'll take a look at that.

                    I'm not on the Betfair staff, so I'm not able to trace your requests.
                    Last edited by jabe; 27-12-2018, 06:21 PM.

                    Comment

                    • Jacky
                      Junior Member
                      • Dec 2018
                      • 21

                      #11
                      Thank you , I have called keepalive , works fine, return token .

                      Comment

                      • Jacky
                        Junior Member
                        • Dec 2018
                        • 21

                        #12


                        Originally posted by jabe View Post
                        I'm trying to think what a useful next step might be.

                        One thing you might try is the keepAlive call.

                        Just spotted the REST examples, so I'll take a look at that.

                        I'm not on the Betfair staff, so I'm not able to trace your requests.
                        This full response from api when enable debug:
                        Post Data: {"filter":{}}

                        * Trying 84.20.200.10...
                        * TCP_NODELAY set
                        * Connected to api.betfair.com (84.20.200.10) port 443 (#0)
                        * ALPN, offering h2
                        * ALPN, offering http/1.1
                        * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@ STRENGTH
                        * successfully set certificate verify locations:
                        * CAfile: /etc/pki/tls/certs/ca-bundle.crt
                        CApath: none
                        * SSL connection using TLSv1.2 / DES-CBC3-SHA
                        * ALPN, server accepted to use http/1.1
                        * Server certificate:
                        * subject: C=IE; ST=Leinster; L=Dublin; O=Paddy Power Betfair Public Limited Company; OU=IT Networks; CN=betfair.com
                        * start date: Sep 11 05:50:38 2018 GMT
                        * expire date: Sep 11 05:59:00 2020 GMT
                        * subjectAltName: host "api.betfair.com" matched cert's "*.betfair.com"
                        * issuer: C=US; O=HydrantID (Avalanche Cloud Corporation); CN=HydrantID SSL ICA G2
                        * SSL certificate verify ok.
                        > POST /exchange/betting/rest/v1.0/listEventTypes/ HTTP/1.1
                        Host: api.betfair.com
                        X-Application: t97i5z***********
                        X-Authentication: Uzk+hrW0WIyL2fL4Ead6DaCd1qLwn********************* ******
                        Accept: application/json
                        Content-Type: application/json
                        Connection: keep-alive
                        Accept-Encoding: gzip, deflate
                        Content-Length: 13

                        * upload completely sent off: 13 out of 13 bytes
                        < HTTP/1.1 200 OK
                        < Date: Thu, 27 Dec 2018 23:01:16 GMT
                        < Server: Cougar - 4.4.2 (Cougar 2 mode)
                        < Cache-Control: no-cache
                        < Content-Type: application/json;charset=utf-8
                        < Content-Encoding: gzip
                        < Vary: Accept-Encoding, User-Agent
                        < Content-Length: 506
                        <
                        * Connection #0 to host api.betfair.com left intact
                        Response: null

                        Comment

                        Working...
                        X