Announcement

Collapse
No announcement yet.

PlaceOrders successfully sent but bets not placed?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PlaceOrders successfully sent but bets not placed?

    Hi all,

    I just built a tool in python that scrapes tips from a horse racing platform in which I'm subscribed, and then I place orders for these tips on betfair.
    I've been testing and I noticed that some bets, although the place order was successful but the bets are actually not placed(or should I say 'bets are not filled').
    Here's a snippet of my placeOrder instruction:

    "instructions": [{"selectionId": "'+str(selectionId)+'","handicap": "0","side": "BACK","orderType": "LIMIT","limitOrder": {"size": "'+str(stake)+'",' '"price": "'+str(odds)+'","persistenceType": "LAPSE"}}]

    Please how can I ensure that my orders are always filled no matter what? Do I have to add/change some parameter in my json instruction?
    Note: I get my price('odds') by calling the listRunnerBook method and fetching the lastTradedPrice as my input price in my placeOrder.

    Any help or pointers would be greatly appreciated.

  • #2
    Hi

    Not sure I fully understood the question, but whether the bet gets matched or lapses at inplay will entirely depend on what price you ask for in the above order placement. You didnt mention anything about the value of the odds variable in the above snippet ?

    Obviously if you place a bet on the favourite at odds of 990 just before the off it wont get matched, however if your odds variable is 1.01, it will get matched.
    (Betfair has something called Best Execution, so that a bet at odds of 1.01 wont in reality get matched at 1.01 it will get matched at whatever price has money available to back at the time of bet placement)

    Comment


    • #3
      Thanks geoffw123 , I opted to just place market orders instead and not Limit orders and that's sorted now.

      However, I'm now facing a different issue and would totally appreciate any help.

      I want to now move my bot to a server(linux) from my local windows computer where I've been testing. I have moved the python script along with the key file I am using on my local computer but when I attempt to run same script on the linux server, it fails to login to betfair.

      I'm thinking it's an issue with the key or cert file... Can the cert/key files be reused across different computers? or do I need to create a new cert file or key file or both when changing servers?

      Thank you in anticipation of your help!!!

      Comment


      • #4
        hiya, sorry cant help you on that question, its not an area I have any experience in. Probably best to write this as a new topic with a relevant title so that a Python guy might spot it

        Comment

        Working...
        X