Bet on Betfair exchange

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • betcoinflip
    Junior Member
    • Sep 2015
    • 5

    #1

    Bet on Betfair exchange

    Hi guys, i am try to make bets on betfair exchange with help of my programm and API but almost all my bets are unmatched.

    Bet size always 4$, size of the price(coefficient/selection) always 300$+, time between i got coefficient size and bet ~5-10 milliseconds.

    PlaceBet reuqest that i'm using:
    Code:
    {\"jsonrpc\": \"2.0\",\"method\": \"SportsAPING/v1.0/placeOrders\","
    + "\"params\": {"
    + "\"marketId\": " + marketId + ", "
    
    + "\"instructions\": [ {"
    + "\"selectionId\": \"" + selectionId + "\","
    + "\"handicap\": \"0\","
    + "\"side\": \"" + side + "\", "
    + "\"orderType\": \"LIMIT\", "
    
    + "\"limitOrder\": {"			    
    + "\"size\": \"" + size + "\","
    + "\"price\": \"" + price + "\","
    + "\"persistenceType\": \"PERSIST\"} "
    + "}]},\"id\": 1}
    May be something wrong with my bet request parameters?


    To get information about market i am using this request
    Code:
    {\"jsonrpc\": \"2.0\", \"method\": \"SportsAPING/v1.0/listMarketBook\",\"params\": {\"marketIds\":[" + event.get_marketId() + "],\"priceProjection\":{\"priceData\":[\"EX_BEST_OFFERS\"],\"virtualise\":\"true\"}}, \"id\": 1}
    Last edited by betcoinflip; 02-09-2015, 02:34 PM. Reason: Added new info
  • Grantay.
    Junior Member
    • Jan 2010
    • 53

    #2
    It is hard to tell from your supplied code. Have you made sure your prices conform within the betfair limits?:

    https://api.developer.betfair.com/se...ice+Increments

    You say "some" bets are unmatched - that is always a possibility. What errors are being returned?

    grantay

    Comment

    • betcoinflip
      Junior Member
      • Sep 2015
      • 5

      #3
      I am always make a 4.0$ bet, i get no errors, just "sizeMatched":0.0. So limits and increment is ok.

      You say "some" bets are unmatched
      unfortunately almost all bets are unmatched =(

      Comment

      • Grantay.
        Junior Member
        • Jan 2010
        • 53

        #4
        Are the bets showing up on the website OK? IF they are, and not getting matched then your prices are not in the market trading range , and no one will want to bet them. If they are not getting to the website then you should be getting errors

        Comment

        • betcoinflip
          Junior Member
          • Sep 2015
          • 5

          #5
          Bets and prices are ok.

          Here is example of my bet request and response:

          Code:
          {"jsonrpc": "2.0","method": "SportsAPING/v1.0/placeOrders","params": {"marketId": "1.120371092", "instructions": [ {"selectionId": "2256480","handicap": "0","side": "BACK", "orderType": "LIMIT", "limitOrder": {"size": "4.0","price": "3.7","persistenceType": "PERSIST"} }]},"id": 1}
          Code:
          {"jsonrpc":"2.0","result":{"status":"SUCCESS","marketId":"1.120371092","instructionReports":[{"status":"SUCCESS","instruction":{"selectionId":2256480,"handicap":0.0,"limitOrder":{"size":4.0,"price":3.7,"persistenceType":"PERSIST"},"orderType":"LIMIT","side":"BACK"},"betId":"54806432352","placedDate":"2015-09-02T18:56:11.000Z","averagePriceMatched":0.0,"sizeMatched":0.0}]},"id":1}
          Weight of price (3.7) equals 1386.58$, bet size equals 4.0$
          Last edited by betcoinflip; 03-09-2015, 02:53 PM.

          Comment

          • betcoinflip
            Junior Member
            • Sep 2015
            • 5

            #6
            Guys any idea why all my bets are unmatched? And how are you checking your bets status (matched/unmatched)?

            Comment

            • Merlin
              Junior Member
              • Jan 2009
              • 56

              #7
              Hi Betcoinflip,
              As your bets are being accepted, but not matched, the most likely problem is that you are requesting a back price which is not available. The fact that none of your bets are being matched suggests that the price you are requesting is consistently higher than the available back price. Are you sure that you are requesting the BACK price rather than the LAY price?

              If you call 'listMarketBook' with priceProjection set to "priceData":["EX_BEST_OFFERS"], you will find the three best available back prices under runners->ex->availableToBack. This will be an array of up to three PriceSizes, with the first one being the best available price.

              You check on the status of your orders with 'listCurrentOrders'; If you need to see both matched and unmatched orders, set the orderProjection to 'ALL'.

              Comment

              • betcoinflip
                Junior Member
                • Sep 2015
                • 5

                #8
                Hi, Merlin!

                Here is my request for info about best prices:
                Code:
                {\"jsonrpc\": \"2.0\", \"method\": \"SportsAPING/v1.0/listMarketBook\",\"params\": {\"marketIds\":["+marketId+"],\"priceProjection\":{\"priceData\":[\"EX_BEST_OFFERS\"],\"virtualise\":\"false\"},\"orderProjection\":\"EXECUTABLE\"}, \"id\": 1}
                From responce i take best weight that bigger than 200$. Bet size always equals 4$

                Time between listMarketBook responce and bet request ~10-20 milliseconds.

                The result (matched or unmatched my bet) i take from bet response ("sizeMatched": field).

                And what interesting, i am get prices with 5000$+ weight and my bets don't want match.


                //=========================UPDATE=================== ==================

                Here is example:

                Tennis event, bet on: Sara Errani
                "marketId":"1.120432087"
                "selectionId":2309567

                prices: 3.2 (weight: 4441.41$), 3.15(5238.01$), 3.1(1655.21$)


                bet sesponce:
                Code:
                {"jsonrpc":"2.0","result":{"status":"SUCCESS","marketId":"1.120432087","instructionReports":[{"status":"SUCCESS","instruction":{"selectionId":2309567,"handicap":0.0,"limitOrder":{"size":4.0,"price":3.2,"persistenceType":"LAPSE"},"orderType":"LIMIT","side":"BACK"},"betId":"54926491000","placedDate":"2015-09-05T18:11:30.000Z","averagePriceMatched":0.0,"sizeMatched":0.0}]},"id":2}
                bet is matched in 5-10 seconds after request.
                Last edited by betcoinflip; 05-09-2015, 07:21 PM.

                Comment

                • roge1
                  Junior Member
                  • Nov 2014
                  • 4

                  #9
                  similar problem here

                  Hi:
                  I've read your message and I have a similar problem, just 20% of bets are accepted. I've improve my results a lot this way:
                  I put the bet for 30 seconds with placeOrders.
                  Then, if the first response is like yours, nothing matched, and usually is, I check every second for the state:
                  "[{\"jsonrpc\":\"2.0\",\"method\":\"SportsAPING/v1.0/listCurrentOrders\",\"params\":{\"betIds\":[\"")
                  .append(betid).append("\"]},\"id\":1}]");
                  check sizeMatched and sizeRemaining on the response
                  And I cancel after 30 or less seconds if nothing get matched.

                  If you have a better solution I wanna know, please share

                  Regards

                  Comment

                  • betdynamics
                    Junior Member
                    • Sep 2010
                    • 534

                    #10
                    Are you using the normal AppKey or the delayed AppKey?

                    Comment

                    Working...
                    X