listCurrentOrders EXECUTABLE bets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Casper
    Junior Member
    • Apr 2020
    • 2

    #1

    listCurrentOrders EXECUTABLE bets

    Hello developers,

    I am having issues fetching livebets that have not been fully completed. I am using the following request to the API:
    HTML Code:
    {
        "jsonrpc": "2.0",
        "method": "SportsAPING/v1.0/listCurrentOrders",
        "params": {
            "orderProjection": "EXECUTABLE",
            "dateRange": {}
        },
        "id": 1
    }
    The response never receives any EXECUTABLE bets/orders:
    HTML Code:
    {
      "jsonrpc": "2.0",
      "result": {
        "currentOrders": [],
        "moreAvailable": false
      },
      "id": 1
    }
    I have set my program to run every 5 seconds and save all new incoming orders to my database, but after setting the orderProjection to EXECUTABLE, no orders are getting imported.

    The use case here, is that my client wants to replace all orders that have not been completed, with new price/odds, to try and complete them within certain criteria.
  • LiamP
    Junior Member
    • Oct 2015
    • 284

    #2
    That exact request works fine for me:

    Code:
    {
      "jsonrpc": "2.0",
      "method": "SportsAPING/v1.0/listCurrentOrders",
      "params": {
        "orderProjection": "EXECUTABLE",
        "dateRange": {}
      },
      "id":1
    }

    Code:
    {
      "jsonrpc":"2.0",
      "result": {"currentOrders":[{"betId":"2002534480...

    Comment

    • Guest

      #3
      Yep me too, my debug string for request and response ....

      Calling: SportsAPING/v1.0/listCurrentOrders With params: {"betIds":null,"marketIds":null,"orderProjectio n": null,"placedDateRange":null,"orderBy":null,"sortDi r":null,"fromRecord":null,"recordCount":null}

      Got Response: {"jsonrpc":"2.0","result":{"currentOrders":[{"betId":"200263451284","marketId":"1.170424157 "," selectionId":"28406468","handicap":"0","priceSize" :{"price":1.01,"size":5.0},"bspLiability":0.0,"s id e":"LAY","status":"EXECUTABLE","persistenceType ":" LAPSE","orderType":"LIMIT","placedDate":"2020-05-13T12:11:26Z","matchedDate":"0001-01-01T00:00:00","averagePriceMatched":0.0,"sizeMatche d":0.0,"sizeRemaining":5.0,"sizeLapsed":0.0,"si zeC ancelled":0.0,"sizeVoided":0.0,"regulatorCode":"MA LTA LOTTERIES AND GAMBLING AUTHORITY"}],"moreAvailable":false},"id":1}


      I assume you pass null for orderProjection you see all non settled bets, ie matched (EXECUTION_COMPLETE) and unmatched (EXECUTABLE)

      Comment

      • Casper
        Junior Member
        • Apr 2020
        • 2

        #4
        This is on me. I was trying to save the orders to my database, but since EXECUTABLE orders do not have "matchedDate", I got errors. "matchedDate" in my database was not nullable, hence no orders getting saved. orderProjection EXECUTABLE works as intended.

        Comment

        Working...
        X