The Next Sports Exchange API is Coming

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AlgoTrader
    Junior Member
    • Mar 2012
    • 243

    #76
    I use curl to send POST requests

    MacBook-Pro:~ anton$ curl -H 'X-App: something' -d '{"k1":"v1"}' https://beta-api.betfair.com/json-rpc
    {"jsonrpc":"2.0","error":{"code":-32700,"message":"DSC-0008"}}
    MacBook-Pro:~ anton$
    Use -d 'json' key to provide json
    Use -H 'k: v' key to add HTTP header

    You may download curl here http://curl.haxx.se/download.html
    Betfair Bots Made Easy

    Comment

    • gus
      Senior Member
      • Jan 2009
      • 134

      #77
      Hi Contrarian. As usual, I seem to be way behind everyone else.

      You mention a Python Code example.

      As yet i haven't seen any meaningful (at least to me) code examples, or login addresses, or anything else on this thread! (an idiot's guide for Java programmers would be nice), but could you or some other kind person point me to where these code example are?

      Thanks.

      Comment

      • gus
        Senior Member
        • Jan 2009
        • 134

        #78
        OK, panic (temporarily) over ... those nice folk at the BDP have just sent me the address of the Manual and how to get the onto the Trial.

        Now all i have to to do is understand it.

        Comment

        • BetfairDeveloperProgram
          Administrator
          • Oct 2008
          • 680

          #79
          Could someone help me translate this Python code example into C#?
          We'll have some C# sample code available in the near future.

          Thanks

          Neil

          Comment

          • AlgoTrader
            Junior Member
            • Mar 2012
            • 243

            #80
            Whatever I do today, I get {"jsonrpc":"2.0","error":{"code":-32602,"message":"DSC-0018"},"id":"1"}. A day off for the new API?
            Betfair Bots Made Easy

            Comment

            • BetfairDeveloperProgram
              Administrator
              • Oct 2008
              • 680

              #81
              Hi AlgoTrader,

              The DSC-0018 error means that a parameter marked as mandatory was not provided.

              Please double check the requests you are sending or post your request here.

              Thanks

              Neil

              Comment

              • AlgoTrader
                Junior Member
                • Mar 2012
                • 243

                #82
                Exellent! Thanks!
                And thanks for providing application key

                Code:
                {
                    "jsonrpc": "2.0",
                    "error": {
                        "code": -32099,
                        "message": "ANGX-0003",
                        "data": {
                            "exceptionname": "APINGException",
                            "APINGException": {
                                "errorDetails": "The session token passed has expired",
                                "errorCode": "INVALID_SESSION_INFORMATION",
                                "requestUUID": "prdang001-12120939-000000a8ba"
                            }
                        }
                    },
                    "id": "1"
                }
                That would be exellent to have a login/logout methods in JSON
                Betfair Bots Made Easy

                Comment

                • AlgoTrader
                  Junior Member
                  • Mar 2012
                  • 243

                  #83
                  My first success invocation done

                  Code:
                  {
                      "jsonrpc": "2.0",
                      "result": [
                          {
                              "countryCode": "GB",
                              "marketCount": 4935
                          },
                          {
                              "countryCode": "AT",
                              "marketCount": 279
                          },
                          ... skipped...
                          {
                              "countryCode": "SK",
                              "marketCount": 10
                          }
                      ],
                      "id": 1
                  }
                  The API is great and simple.
                  Betfair Bots Made Easy

                  Comment

                  • AlgoTrader
                    Junior Member
                    • Mar 2012
                    • 243

                    #84
                    What I really like is JSON compression ratio:

                    listMarketCatalogue response: raw length=2787, json length=25494, compression=89%
                    listMarketBook response: raw length=2171, json length=6736, compression=68%

                    I never saw such good compression in API 6
                    Last edited by AlgoTrader; 14-12-2012, 11:35 AM.
                    Betfair Bots Made Easy

                    Comment

                    • Lopiner
                      Junior Member
                      • Feb 2009
                      • 117

                      #85
                      Hi, how can i get into the Trial? Ty
                      fooledbyabet.com

                      Comment

                      • AlgoTrader
                        Junior Member
                        • Mar 2012
                        • 243

                        #86
                        Originally posted by Lopiner View Post
                        Hi, how can i get into the Trial? Ty
                        Have a look at https://github.com/AlgoTrader/betfair, I believe it is the first library that supports Betfair's JSON-RPC API.

                        You need to request Betfair for an Application Key to use the API.

                        I also have plans to write a Betfair JSON-RPC library for browsers. It should be very simple and it would be easy to create simple Betfair applications just in browser's JavaScript. There are two JavaScript's environments: node.js for high-end server applications and browser like Chrome/Firefox for simple GUI applications.
                        Betfair Bots Made Easy

                        Comment

                        • ml31415
                          Junior Member
                          • Dec 2012
                          • 1

                          #87
                          Big thumbs up for the new API. I'm sure it will be a big ease compare to the current one. I stumbled upon some hidden gem concerning RESTful API design recently, maybe it's also of interest for you:

                          http://stackoverflow.com/questions/1...619677#1619677

                          Comment

                          • Scrumpy Dog
                            Junior Member
                            • Nov 2009
                            • 4

                            #88
                            Getting in on the trial

                            Hey guys,

                            I wrote (mostly been rewritten by contributors now) and maintain the Betfair Ruby Gem.

                            Can I please get some info on getting in on this trial of the new API so that I can have a new gem ready to go when the the API is released the general public.

                            Dudes from BDP please email via lukeb at lukebyrne dot com

                            Thanks in advance.

                            Luke

                            Comment

                            • theswan1
                              Junior Member
                              • Jul 2010
                              • 7

                              #89
                              Originally posted by AlgoTrader View Post
                              You need to request Betfair for an Application Key to use the API.
                              Is that by emailing the bdp address?

                              cheers
                              Java/Scala Blog - GitHub -

                              Comment

                              • AlgoTrader
                                Junior Member
                                • Mar 2012
                                • 243

                                #90
                                Originally posted by theswan1 View Post
                                Is that by emailing the bdp address?
                                Exactly, you are right
                                Betfair Bots Made Easy

                                Comment

                                Working...
                                X