PlaceOrder - unmatched bet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nad
    Junior Member
    • Oct 2018
    • 1

    #1

    PlaceOrder - unmatched bet

    Hi, I am new to Betfair API. At the moment I am sending a placeOrder request at the highest price on a particular selection in a market but some orders I placed were unmatched. In that case, I want to send the order again with a lower price. I would like to ask if there is a way to check if the order is unmatched and if matched, the amount that is matched.

    Thanks!
  • BetfairDeveloperProgram
    Administrator
    • Oct 2008
    • 679

    #2
    Hi nad

    You can check matched/unmatched orders using listCurrentOrders. Below is an example for retrieving EXECUTABLE orders only.

    Code:
    [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listCurrentOrders", "params": {"orderProjection":"EXECUTABLE","dateRange":{}}, "id": 1}]
    
    [{"jsonrpc":"2.0","result":{"currentOrders":[{"betId":"141174142644","marketId":"1.148072106","selectionId":22,"handicap":0.0,"priceSize":{"price":1.65,"size":2.0},"bspLiability":0.0,"side":"BACK","status":"EXECUTABLE","persistenceType":"LAPSE","orderType":"LIMIT","placedDate":"2018-10-15T15:23:34.000Z","averagePriceMatched":0.0,"sizeMatched":0.0,"sizeRemaining":2.0,"sizeLapsed":0.0,"sizeCancelled":0.0,"sizeVoided":0.0,"regulatorCode":"GIBRALTAR REGULATOR"}],"moreAvailable":false},"id":1}]
    Please see the documentation via https://docs.developer.betfair.com/d...tCurrentOrders regarding best practice when using listCurrentOrders.

    Thanks

    Neil

    Comment

    Working...
    X